5d42f12b06a3d8874636452513c11b3394b944e400eea3335a7b0b98061f89eb60ed6f25aff81f91d705c12d8a2fda96ff49ae1c48a1939fdbb01c622feeb8 1.9 KB

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