Closed mk-pmb closed 7 years ago
fwiw it's fine for newly added lines to not have trailing whitespace; I always remove trailing whitespace on lines I've touched for other reasons. The preferred style isn't "consistent", it's "don't make whitespace-only changes".
No problem, PR was just meant to make adding easier in case you want a test for this. You can always roll your own of course, or just not test it.
AssertionErrors are already instanceof Errors; it's part of node core. Thus, it's node's job to test it, not object-inspect's.
As I pointed out above, a reliable "is error" module is impossible in JavaScript at the moment, pending https://github.com/ljharb/proposal-error-stacks
a reliable "is error" module is impossible in JavaScript at the moment,
Yeah, it's a pity we can't have the perfect thing (yet). I prefer to use the best available thing in the meantime, and hope that community effort can collect edge case fixes to work to get it even closer to perfect.
Your proposal looks good though! :+1: Thanks for telling me, I'll subscribe it so I can use it in is-error
asap.
My fix in
inspectobj-pmb
wil be to delegate error identification to theis-error
package so I can maintain it in one central place.PS: You'll probably want to add spaces in ln. 40 and 44.I've just deleted the lines, easier for my rebase later.