Home

Awesome

es-shim API <sup>Version Badge</sup>

github actions coverage License Downloads

npm badge

API Contract

For any given “es-shim API”-compliant package foo, the following invariants must hold:

Multi-shim Packages

If your package contains multiple shims, you can pass --multi to apply these invariants:

Recommended dependencies

How to denote compliance

Prominently in the package’s README, please include the following markdown:

This package implements the [es-shim API](https://github.com/es-shims/api) interface. It works in an ES3-supported environment and complies with the [spec](https://www.ecma-international.org/ecma-262/6.0/).

Please modify “ES3” as needed to the level of support, and please update the spec link so it points directly to the most relevant section of the spec it complies with.

Binary

Very simple and shallow tests that a package follows the es-shim API.

Pass --bound to indicate that the function the package is implementing depends on having a receiver (a “this” value).

Example

es-shim-api object-assign
es-shim-api array-includes --bound

Tests

Simply clone the repo, npm install, and run npm test