sindresorhus/parse-json

Remove error-ex as dependency

prisis opened this issue · 3 comments

prisis commented

Would you accept a PR that will remove "error-ex" as a dependency?

The current implementation could be switched to

Example:

class JSONError extends Error {
  constructor(message) {
    super(message);
    this.name = 'JSONError';
    this.fileName = undefined
    this.codeFrame = undefined
    this.rawCodeFrame = undefined
  }
}

Yes

fisker commented

error-ex has the ability to show different message when assign a fileName to error, I think it's useful.

prisis commented

You mean this part fileName: errorEx.append('in %s')?

If yes this could be done in the new error too