es-errors
npmv1.3.0TypeScriptA simple cache for a few of the JS Error constructors.
Adopt with care
es-errors is usable, with caveats. Last published 948 days ago.
- ?Adoption: grade ?, Not reported by this registry.
No download data reported for this package yet.
- DMaintenance: grade D, Poor — a real concern.
Last published 948 days ago.
- AWeight: grade A, Excellent.
Zero runtime dependencies, about 12 KB installed.
- BSupply chain: grade B, Good.
This package has a single maintainer (bus factor of 1).
- ALicense: grade A, Excellent.
MIT — permissive, with no copyleft found in the dependency tree.
Grades are computed deterministically from registry metadata collected by PackageGraph — downloads, dependents, publish dates, the resolved dependency tree, maintainer count, and declared licenses. No third-party scores are used.
Install cost
What you actually take on by adding es-errors to a project.
Runtime packages this one declares itself.
Distinct packages in the full runtime tree, deduplicated the way a package manager would.
Unpacked size of this package plus its entire runtime tree.
Longest resolved dependency chain below this package.
Compatibility
- Node.js
- node >= 0.4
- Module format
- CommonJS only
- TypeScript
- Types included
- Install scripts
- None
Quick start
A usage example from the es-errors README.
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);es-errors vs the alternatives
Packages solving a similar problem in the npm ecosystem, compared on the signals that drive an adoption decision.
| Package | Weekly downloads | Dependents | License | Last release |
|---|---|---|---|---|
| es-errorsthis page | 0 | 15 | MIT | 2 years ago |
| eslint | 138.4M | 279 | MIT | 1 day ago |
| es-define-property | 131.3M | 4 | MIT | 1 day ago |
| call-bind | 80.7M | 5 | MIT | 1 day ago |
| esprima | 77.6M | 5 | BSD-2-Clause | 1 day ago |
| @babel/parser | 0 | 23 | MIT | 1 day ago |
Dependencies
Declared by es-errors v1.3.0. Runtime dependencies are installed with the package; dev dependencies are not.
Dev (13)
Used by
Popular packages that depend on es-errors.
ES spec-like internal slots
Store information about any JS value in a side channel. Uses WeakMap if available.
Firefox 17-26 iterators throw a StopIteration object to indicate "done". This normalizes it.
Store information about any JS value in a side channel, using a Map
Get and robustly cache all JS language-level intrinsics at first require time
ES6 spec-compliant RegExp.prototype.flags shim.
Store information about any JS value in a side channel. Uses WeakMap if available.
Set a function's length property
Helper functions around Function call/apply/bind, for use in `call-bind`
resolve like require.resolve() on behalf of files asynchronously and synchronously
ES Object-related atoms: Object, ToObject, RequireObjectCoercible
Define a data property on an object. Will fall back to assignment in an engine without descriptors.
Set a function's name property
A helper to optimistically set Symbol.toStringTag, when possible.
Store information about any JS value in a side channel, using a linked list
Relationship graph
Dependencies (left) and dependents (right) of es-errors.
Frequently installed together
An AST-based pattern checker for JavaScript.
string representations of objects in node and the browser
A robust, ES3 compatible, "has own property" predicate.
Get and robustly cache all JS language-level intrinsics at first require time
`Object.getOwnPropertyDescriptor`, but accounts for IE's broken implementation.
Robust call-bound JavaScript intrinsics, using `call-bind` and `get-intrinsic`.
Implementation of Function.prototype.bind
`Object.defineProperty`, but not IE 8's broken one.
Robustly `.call.bind()` a function
Store information about any JS value in a side channel, using a Map
Does this JS environment support the `name` property on functions?
Define a data property on an object. Will fall back to assignment in an engine without descriptors.
Release history
No releases in the last two years, typically about 0 days apart.
| Version | Published | Size | License |
|---|---|---|---|
| 1.3.0latest | 2 years ago | 12 KB | MIT |
| 1.2.1 | 2 years ago | 11 KB | MIT |
| 1.2.0 | 2 years ago | 11 KB | MIT |
| 1.1.0 | 2 years ago | 11 KB | MIT |
| 1.0.0 | 2 years ago | 10 KB | MIT |
Overview
es-errors is an npm package that a simple cache for a few of the JS Error constructors. It has 15 known dependents in the graph. The latest version is 1.3.0, released under the MIT license.
Who should use it
Teams working in the npm ecosystem who need a simple cache for a few of the JS Error constructors and value a focused solution.
When not to use it
Consider an alternative if you need to or if a more actively-maintained option better fits your npm stack.
Pros
- Ships TypeScript type definitions.
- Clear open-source license (MIT).
Cons
- No significant drawbacks detected from available metadata.
Auto-generated from collected registry metadata. No external claims are inferred.
Maintainers
Frequently asked questions
Should I use es-errors?
es-errors is usable, with caveats. Last published 948 days ago.
How do I install es-errors?
Run `npm install es-errors` to add es-errors to your npm project.
What license is es-errors released under?
es-errors is distributed under the MIT license.
How popular is es-errors?
npm does not publish download counts. Within PackageGraph's crawl, 15 known packages depend on es-errors.
Is es-errors still maintained?
The most recent release of es-errors (v1.3.0) was published 2 years ago.
Does es-errors run install scripts?
No. es-errors does not define preinstall, install, or postinstall scripts, so installing it does not execute publisher-supplied code.