UNPKG

eslint-plugin-json-light-pmb

Version:

(2022 maintenance fork) Light ESLint plugin for JSON validating

15 lines (13 loc) 367 B
'use strict'; module.exports = class ExtendableError extends Error { constructor(message, hash) { super(message); this.name = this.constructor.name; this.hash = hash; if (typeof Error.captureStackTrace === 'function') { Error.captureStackTrace(this, this.constructor); } else { this.stack = (new Error(message)).stack; } } };