pkgjs / parseargs

Polyfill of `util.parseArgs()`
Apache License 2.0
121 stars 9 forks source link

error: switch to existing ERR_INVALID_ARG_VALUE #97

Closed bcoe closed 2 years ago

bcoe commented 2 years ago

Switch to using an error that already exists, to simplify merging into Node.js.

shadowspawn commented 2 years ago

There is a potential difference between errors made by the author, and errors made by the end user that the author wants to catch.

I think it is a good idea to use the preexisting error for this case which is an author error.