# es-abstract

> ECMAScript spec abstract operations.

Latest version **1.24.2** (published 2026-04-07) · MIT license · 0 weekly downloads

## Install

```sh
npm install es-abstract
pnpm add es-abstract
yarn add es-abstract
bun add es-abstract
```

## Health

**Score 58/100 (C)** — status: active.

Positive: has types package; no vulnerabilities; high maintenance score; high quality score.

Warnings: low downloads; no esm support.

## Facts

| | |
|---|---|
| Version | 1.24.2 |
| Published | 2026-04-07 |
| First published | 2015-01-11 |
| Weekly downloads | 0 |
| License | MIT |
| TypeScript types | separate (@types/es-abstract) |
| Module format | CommonJS |
| Node | >= 0.4 |
| Dependencies | 54 |
| Unpacked size | 2.7 MB |
| Known vulnerabilities | 0 |
| Install scripts | no |
| GitHub stars | 125 |
| Author | Jordan Harband |
| Maintainers | ljharb |
| Keywords | ECMAScript, ES, abstract, operation, abstract operation, JavaScript, ES5, ES6, ES7 |

## Links

- npm: https://www.npmjs.com/package/es-abstract
- Repository: https://github.com/ljharb/es-abstract
- Homepage: https://github.com/ljharb/es-abstract#readme
- Issues: https://github.com/ljharb/es-abstract/issues
- Funding: https://github.com/sponsors/ljharb
- npm.io page: https://npm.io/package/es-abstract

## Dependencies (54)

- [gopd](https://npm.io/package/gopd.md) ^1.2.0
- [hasown](https://npm.io/package/hasown.md) ^2.0.2
- [is-set](https://npm.io/package/is-set.md) ^2.0.3
- [is-regex](https://npm.io/package/is-regex.md) ^1.2.1
- [own-keys](https://npm.io/package/own-keys.md) ^1.0.1
- [call-bind](https://npm.io/package/call-bind.md) ^1.0.8
- [es-errors](https://npm.io/package/es-errors.md) ^1.3.0
- [get-proto](https://npm.io/package/get-proto.md) ^1.0.1
- [has-proto](https://npm.io/package/has-proto.md) ^1.2.0
- [is-string](https://npm.io/package/is-string.md) ^1.1.1
- [set-proto](https://npm.io/package/set-proto.md) ^1.0.0
- [call-bound](https://npm.io/package/call-bound.md) ^1.0.4
- [globalthis](https://npm.io/package/globalthis.md) ^1.0.4
- [is-weakref](https://npm.io/package/is-weakref.md) ^1.1.1
- [has-symbols](https://npm.io/package/has-symbols.md) ^1.1.0
- [is-callable](https://npm.io/package/is-callable.md) ^1.2.7
- [object-keys](https://npm.io/package/object-keys.md) ^1.1.1
- [is-data-view](https://npm.io/package/is-data-view.md) ^1.0.2
- [get-intrinsic](https://npm.io/package/get-intrinsic.md) ^1.3.0
- [internal-slot](https://npm.io/package/internal-slot.md) ^1.1.0
- [object.assign](https://npm.io/package/object.assign.md) ^4.1.7
- [is-typed-array](https://npm.io/package/is-typed-array.md) ^1.1.15
- [object-inspect](https://npm.io/package/object-inspect.md) ^1.13.4
- [es-object-atoms](https://npm.io/package/es-object-atoms.md) ^1.1.1
- [es-to-primitive](https://npm.io/package/es-to-primitive.md) ^1.3.0
- [is-array-buffer](https://npm.io/package/is-array-buffer.md) ^3.0.5
- [math-intrinsics](https://npm.io/package/math-intrinsics.md) ^1.1.0
- [safe-push-apply](https://npm.io/package/safe-push-apply.md) ^1.0.0
- [safe-regex-test](https://npm.io/package/safe-regex-test.md) ^1.1.0
- [unbox-primitive](https://npm.io/package/unbox-primitive.md) ^1.1.0
- [data-view-buffer](https://npm.io/package/data-view-buffer.md) ^1.0.2
- [is-negative-zero](https://npm.io/package/is-negative-zero.md) ^2.0.3
- [safe-array-concat](https://npm.io/package/safe-array-concat.md) ^1.1.3
- [which-typed-array](https://npm.io/package/which-typed-array.md) ^1.1.19
- [es-define-property](https://npm.io/package/es-define-property.md) ^1.0.1
- [es-set-tostringtag](https://npm.io/package/es-set-tostringtag.md) ^2.1.0
- [typed-array-buffer](https://npm.io/package/typed-array-buffer.md) ^1.0.3
- [typed-array-length](https://npm.io/package/typed-array-length.md) ^1.0.7
- [data-view-byte-length](https://npm.io/package/data-view-byte-length.md) ^1.0.2
- [data-view-byte-offset](https://npm.io/package/data-view-byte-offset.md) ^1.0.1
- [string.prototype.trim](https://npm.io/package/string.prototype.trim.md) ^1.2.10
- [available-typed-arrays](https://npm.io/package/available-typed-arrays.md) ^1.0.7
- [get-symbol-description](https://npm.io/package/get-symbol-description.md) ^1.1.0
- [is-shared-array-buffer](https://npm.io/package/is-shared-array-buffer.md) ^1.0.4
- [regexp.prototype.flags](https://npm.io/package/regexp.prototype.flags.md) ^1.5.4
- [function.prototype.name](https://npm.io/package/function.prototype.name.md) ^1.1.8
- [stop-iteration-iterator](https://npm.io/package/stop-iteration-iterator.md) ^1.1.0
- [typed-array-byte-length](https://npm.io/package/typed-array-byte-length.md) ^1.0.3
- [typed-array-byte-offset](https://npm.io/package/typed-array-byte-offset.md) ^1.0.4
- [array-buffer-byte-length](https://npm.io/package/array-buffer-byte-length.md) ^1.0.2
- [has-property-descriptors](https://npm.io/package/has-property-descriptors.md) ^1.0.2
- [string.prototype.trimend](https://npm.io/package/string.prototype.trimend.md) ^1.0.9
- [string.prototype.trimstart](https://npm.io/package/string.prototype.trimstart.md) ^1.0.8
- [arraybuffer.prototype.slice](https://npm.io/package/arraybuffer.prototype.slice.md) ^1.0.4

## Alternatives

- [duck](https://npm.io/package/duck.md) — 4.2M weekly downloads
- [ava](https://npm.io/package/ava.md) — 560.2K weekly downloads
- [storybook-addon-module-mock](https://npm.io/package/storybook-addon-module-mock.md) — 71.7K weekly downloads
- [vest](https://npm.io/package/vest.md) — 50.1K weekly downloads
- [@ethereum-waffle/mock-contract](https://npm.io/package/@ethereum-waffle/mock-contract.md) — 40.0K weekly downloads

## Recent versions

- 1.24.2 (latest) — 2026-04-07
- 1.23.2 (next) — 2024-03-18
- 1.24.1 — 2025-12-13
- 1.24.0 — 2025-05-29
- 1.23.10 — 2025-05-21
- 1.23.9 — 2025-01-02
- 1.23.8 — 2024-12-29
- 1.23.7 — 2024-12-21
- 1.23.6 — 2024-12-16
- 1.23.5 — 2024-11-14
- 1.23.4 — 2024-11-13
- 1.23.3 — 2024-03-29
- 1.23.1 — 2024-03-17
- 1.23.0 — 2024-03-06
- 1.22.5 — 2024-02-28
- … 78 more at https://npm.io/package/es-abstract/versions

## README

# es-abstract <sup>[![Version Badge][npm-version-svg]][package-url]</sup>

[![dependency status][deps-svg]][deps-url]
[![dev dependency status][dev-deps-svg]][dev-deps-url]
[![License][license-image]][license-url]
[![Downloads][downloads-image]][downloads-url]

[![npm badge][npm-badge-png]][package-url]

ECMAScript spec abstract operations.

Every operation is available by edition/year and by name - for example, `es-abstract/2020/Call` gives you the `Call` operation from ES2020, `es-abstract/5/Type` gives you the `Type` operation from ES5.

All abstract operations are also available under an `es5`/`es2015`/`es2016`/`es2017`/`es2018`/`es2019`/`es2020`/`es2021` entry point, and as a property on the `main` export, but using deep imports is highly encouraged for bundle size and performance reasons. Non-deep entry points will be removed in the next semver-major release.

## Example

```js
var ES = require('es-abstract');
var assert = require('assert');

assert(ES.isCallable(function () {}));
assert(!ES.isCallable(/a/g));
```

## Tests
Simply clone the repo, `npm install`, and run `npm test`

## Security

Please email [@ljharb](https://github.com/ljharb) or see https://tidelift.com/security if you have a potential security vulnerability to report.

[package-url]: https://npmjs.org/package/es-abstract
[npm-version-svg]: https://versionbadg.es/ljharb/es-abstract.svg
[deps-svg]: https://david-dm.org/ljharb/es-abstract.svg
[deps-url]: https://david-dm.org/ljharb/es-abstract
[dev-deps-svg]: https://david-dm.org/ljharb/es-abstract/dev-status.svg
[dev-deps-url]: https://david-dm.org/ljharb/es-abstract#info=devDependencies
[npm-badge-png]: https://nodei.co/npm/es-abstract.png?downloads=true&stars=true
[license-image]: https://img.shields.io/npm/l/es-abstract.svg
[license-url]: LICENSE
[downloads-image]: https://img.shields.io/npm/dm/es-abstract.svg
[downloads-url]: https://npm-stat.com/charts.html?package=es-abstract

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