zheng d4d8c5534b webpack 21 tuntia sitten
..
.github d4d8c5534b webpack 21 tuntia sitten
test d4d8c5534b webpack 21 tuntia sitten
.eslintrc d4d8c5534b webpack 21 tuntia sitten
CHANGELOG.md d4d8c5534b webpack 21 tuntia sitten
LICENSE d4d8c5534b webpack 21 tuntia sitten
README.md d4d8c5534b webpack 21 tuntia sitten
eval.d.ts d4d8c5534b webpack 21 tuntia sitten
eval.js d4d8c5534b webpack 21 tuntia sitten
index.d.ts d4d8c5534b webpack 21 tuntia sitten
index.js d4d8c5534b webpack 21 tuntia sitten
package.json d4d8c5534b webpack 21 tuntia sitten
range.d.ts d4d8c5534b webpack 21 tuntia sitten
range.js d4d8c5534b webpack 21 tuntia sitten
ref.d.ts d4d8c5534b webpack 21 tuntia sitten
ref.js d4d8c5534b webpack 21 tuntia sitten
syntax.d.ts d4d8c5534b webpack 21 tuntia sitten
syntax.js d4d8c5534b webpack 21 tuntia sitten
tsconfig.json d4d8c5534b webpack 21 tuntia sitten
type.d.ts d4d8c5534b webpack 21 tuntia sitten
type.js d4d8c5534b webpack 21 tuntia sitten
uri.d.ts d4d8c5534b webpack 21 tuntia sitten
uri.js d4d8c5534b webpack 21 tuntia sitten

README.md

es-errors Version Badge

github actions coverage License Downloads

npm badge

A simple cache for a few of the JS Error constructors.

Example

const assert = require('assert');

const Base = require('es-errors');
const Eval = require('es-errors/eval');
const Range = require('es-errors/range');
const Ref = require('es-errors/ref');
const Syntax = require('es-errors/syntax');
const Type = require('es-errors/type');
const URI = require('es-errors/uri');

assert.equal(Base, Error);
assert.equal(Eval, EvalError);
assert.equal(Range, RangeError);
assert.equal(Ref, ReferenceError);
assert.equal(Syntax, SyntaxError);
assert.equal(Type, TypeError);
assert.equal(URI, URIError);

Tests

Simply clone the repo, npm install, and run npm test

Security

Please email @ljharb or see https://tidelift.com/security if you have a potential security vulnerability to report.