Bakhtina Sofya b84cb877be 1st comm | il y a 3 semaines | |
---|---|---|
.. | ||
.github | il y a 3 semaines | |
test | il y a 3 semaines | |
.eslintrc | il y a 3 semaines | |
CHANGELOG.md | il y a 3 semaines | |
LICENSE | il y a 3 semaines | |
README.md | il y a 3 semaines | |
eval.d.ts | il y a 3 semaines | |
eval.js | il y a 3 semaines | |
index.d.ts | il y a 3 semaines | |
index.js | il y a 3 semaines | |
package.json | il y a 3 semaines | |
range.d.ts | il y a 3 semaines | |
range.js | il y a 3 semaines | |
ref.d.ts | il y a 3 semaines | |
ref.js | il y a 3 semaines | |
syntax.d.ts | il y a 3 semaines | |
syntax.js | il y a 3 semaines | |
tsconfig.json | il y a 3 semaines | |
type.d.ts | il y a 3 semaines | |
type.js | il y a 3 semaines | |
uri.d.ts | il y a 3 semaines | |
uri.js | il y a 3 semaines |
A simple cache for a few of the JS Error constructors.
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);
Simply clone the repo, npm install
, and run npm test
Please email @ljharb or see https://tidelift.com/security if you have a potential security vulnerability to report.