冯博深 e3294c98a1 first 1 өдөр өмнө
..
.github e3294c98a1 first 1 өдөр өмнө
test e3294c98a1 first 1 өдөр өмнө
.eslintrc e3294c98a1 first 1 өдөр өмнө
CHANGELOG.md e3294c98a1 first 1 өдөр өмнө
LICENSE e3294c98a1 first 1 өдөр өмнө
README.md e3294c98a1 first 1 өдөр өмнө
eval.d.ts e3294c98a1 first 1 өдөр өмнө
eval.js e3294c98a1 first 1 өдөр өмнө
index.d.ts e3294c98a1 first 1 өдөр өмнө
index.js e3294c98a1 first 1 өдөр өмнө
package.json e3294c98a1 first 1 өдөр өмнө
range.d.ts e3294c98a1 first 1 өдөр өмнө
range.js e3294c98a1 first 1 өдөр өмнө
ref.d.ts e3294c98a1 first 1 өдөр өмнө
ref.js e3294c98a1 first 1 өдөр өмнө
syntax.d.ts e3294c98a1 first 1 өдөр өмнө
syntax.js e3294c98a1 first 1 өдөр өмнө
tsconfig.json e3294c98a1 first 1 өдөр өмнө
type.d.ts e3294c98a1 first 1 өдөр өмнө
type.js e3294c98a1 first 1 өдөр өмнө
uri.d.ts e3294c98a1 first 1 өдөр өмнө
uri.js e3294c98a1 first 1 өдөр өмнө

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.