# es-error-intrinsics

> A simple cache for a few of the JS error constructors.

Latest version **1.0.1** (published 2025-12-20) · MIT license · 0 weekly downloads

## Install

```sh
npm install es-error-intrinsics
pnpm add es-error-intrinsics
yarn add es-error-intrinsics
bun add es-error-intrinsics
```

## Health

**Score 45/100 (D)** — status: stable.

Positive: no vulnerabilities.

Warnings: low downloads; no types; no esm support.

## Facts

| | |
|---|---|
| Version | 1.0.1 |
| Published | 2025-12-20 |
| First published | 2025-12-20 |
| Weekly downloads | 0 |
| License | MIT |
| TypeScript types | none |
| Module format | CommonJS |
| Dependencies | 0 |
| Unpacked size | 2.3 KB |
| Known vulnerabilities | 0 |
| Install scripts | no |
| GitHub stars | 2 |
| Author | Fox Jones |
| Maintainers | xsfj |
| Keywords | javascript, ecmascript, error, typeerror, rangeerror, syntaxerror, cache, get-intrinsic, intrinsics, js, es, utils, intrinsic |

## Links

- npm: https://www.npmjs.com/package/es-error-intrinsics
- Repository: https://github.com/xsfj/es-error-intrinsics
- Homepage: https://github.com/xsfj/es-error-intrinsics#readme
- Issues: https://github.com/xsfj/es-error-intrinsics/issues
- npm.io page: https://npm.io/package/es-error-intrinsics

## Alternatives

- [@mapbox/jsonlint-lines-primitives](https://npm.io/package/@mapbox/jsonlint-lines-primitives.md) — 5.3M weekly downloads
- [reftools](https://npm.io/package/reftools.md) — 3.5M weekly downloads
- [@hey-api/openapi-ts](https://npm.io/package/@hey-api/openapi-ts.md) — 3.5M weekly downloads
- [@mapbox/geojson-rewind](https://npm.io/package/@mapbox/geojson-rewind.md) — 2.4M weekly downloads
- [turbo-stream](https://npm.io/package/turbo-stream.md) — 1.7M weekly downloads

## Recent versions

- 1.0.1 (latest) — 2025-12-20
- 1.0.0 — 2025-12-20

## README

# es-error-intrinsics

A simple cache for a few of the JS Error constructors. If error classes that were introduced after ES3 (those being `AggregateError` and `SuppressedError`) are not available, they export `undefined`.

## Example

```js
const assert = require("assert-x");

const $BaseError = require("es-error-intrinsics/Error");
const $AggregateError = require("es-error-intrinsics/AggregateError");
const $EvalError = require("es-error-intrinsics/EvalError");
const $RangeError = require("es-error-intrinsics/RangeError");
const $ReferenceError = require("es-error-intrinsics/ReferenceError");
const $SuppressedError = require("es-error-intrinsics/SuppressedError");
const $SyntaxError = require("es-error-intrinsics/SyntaxError");
const $TypeError = require("es-error-intrinsics/TypeError");
const $URIError = require("es-error-intrinsics/URIError");

assert.equal($BaseError, Error);
assert.equal($AggregateError, AggregateError);
assert.equal($EvalError, EvalError);
assert.equal($RangeError, RangeError);
assert.equal($ReferenceError, ReferenceError);
assert.equal($SuppressedError, SuppressedError);
assert.equal($SyntaxError, SyntaxError);
assert.equal($TypeError, TypeError);
assert.equal($URIError, URIError);
```

---
_Source: https://npm.io/package/es-error-intrinsics · Machine-readable twin of the npm.io package page. Health data is recomputed on every publish._
