186 GB
47,027 files
Updated 3 months ago
Name
Size
.github
test
.eslintrc43 Bytes
xet
CHANGELOG.md1.83 kB
xet
LICENSE1.07 kB
xet
README.md2.11 kB
xet
eval.d.ts68 Bytes
xet
eval.js75 Bytes
xet
index.d.ts56 Bytes
xet
index.js66 Bytes
xet
package.json2.17 kB
xet
range.d.ts71 Bytes
xet
range.js77 Bytes
xet
ref.d.ts83 Bytes
xet
ref.js79 Bytes
xet
syntax.d.ts74 Bytes
xet
syntax.js79 Bytes
xet
tsconfig.json3.17 kB
xet
type.d.ts67 Bytes
xet
type.js75 Bytes
xet
uri.d.ts65 Bytes
xet
uri.js73 Bytes
xet
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.

Total size
186 GB
Files
47,027
Last updated
May 1
Pre-warmed CDN
US EU US EU

Contributors