[d565449] | 1 | # es-abstract <sup>[![Version Badge][npm-version-svg]][package-url]</sup>
|
---|
| 2 |
|
---|
| 3 | [![dependency status][deps-svg]][deps-url]
|
---|
| 4 | [![dev dependency status][dev-deps-svg]][dev-deps-url]
|
---|
| 5 | [![License][license-image]][license-url]
|
---|
| 6 | [![Downloads][downloads-image]][downloads-url]
|
---|
| 7 |
|
---|
| 8 | [![npm badge][npm-badge-png]][package-url]
|
---|
| 9 |
|
---|
| 10 | ECMAScript spec abstract operations.
|
---|
| 11 |
|
---|
| 12 | 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.
|
---|
| 13 |
|
---|
| 14 | 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.
|
---|
| 15 |
|
---|
| 16 | ## Example
|
---|
| 17 |
|
---|
| 18 | ```js
|
---|
| 19 | var ES = require('es-abstract');
|
---|
| 20 | var assert = require('assert');
|
---|
| 21 |
|
---|
| 22 | assert(ES.isCallable(function () {}));
|
---|
| 23 | assert(!ES.isCallable(/a/g));
|
---|
| 24 | ```
|
---|
| 25 |
|
---|
| 26 | ## Tests
|
---|
| 27 | Simply clone the repo, `npm install`, and run `npm test`
|
---|
| 28 |
|
---|
| 29 | ## Security
|
---|
| 30 |
|
---|
| 31 | Please email [@ljharb](https://github.com/ljharb) or see https://tidelift.com/security if you have a potential security vulnerability to report.
|
---|
| 32 |
|
---|
| 33 | [package-url]: https://npmjs.org/package/es-abstract
|
---|
| 34 | [npm-version-svg]: https://versionbadg.es/ljharb/es-abstract.svg
|
---|
| 35 | [deps-svg]: https://david-dm.org/ljharb/es-abstract.svg
|
---|
| 36 | [deps-url]: https://david-dm.org/ljharb/es-abstract
|
---|
| 37 | [dev-deps-svg]: https://david-dm.org/ljharb/es-abstract/dev-status.svg
|
---|
| 38 | [dev-deps-url]: https://david-dm.org/ljharb/es-abstract#info=devDependencies
|
---|
| 39 | [npm-badge-png]: https://nodei.co/npm/es-abstract.png?downloads=true&stars=true
|
---|
| 40 | [license-image]: https://img.shields.io/npm/l/es-abstract.svg
|
---|
| 41 | [license-url]: LICENSE
|
---|
| 42 | [downloads-image]: https://img.shields.io/npm/dm/es-abstract.svg
|
---|
| 43 | [downloads-url]: https://npm-stat.com/charts.html?package=es-abstract
|
---|