ECMAScript 7 compatibility shims for legacy JavaScript engines
Permalink
Failed to load latest commit information.
test [Breaking] remove `Map#toJSON`/`Set#toJSON`, since they were rejected… Jul 5, 2016
.editorconfig Dotfiles and npm scripts for them. Jan 7, 2015
.eslintrc [Dev Deps] update `tape`, `browserify`, `uglify-js`, `jscs`, `nsp`, `… Apr 18, 2017
.gitignore Add build, minify, and prepublish scripts. Jan 7, 2015
.jscs.json [Dev Deps] update `jscs`, `nsp`, `eslint` Apr 15, 2016
.npmignore Add build, minify, and prepublish scripts. Jan 7, 2015
.travis.yml [Tests] npm v5+ is broken on node < v4 May 31, 2017
Array.js Add `use strict` pragma to everything. Jul 2, 2015
Array.prototype.includes.js Add `use strict` pragma to everything. Jul 2, 2015
Array.prototype.js Add `use strict` pragma to everything. Jul 2, 2015
CHANGELOG.md v6.0.0 Jul 5, 2016
CONTRIBUTORS.md Add contributors file Jan 6, 2015
LICENSE Update license year to 2016 Jan 16, 2016
Makefile Add `make release`, `make list`, and `make test`. Jan 7, 2015
Object.js Add `Object.values` and `Object.entries` Sep 23, 2015
README.md Fix broken Markdown headings Apr 18, 2017
String.js Add `use strict` pragma to everything. Jul 2, 2015
String.prototype.at.js Add `use strict` pragma to everything. Jul 2, 2015
String.prototype.js Rename `String#{padLeft,padRight}` → `String#{padStart,padEnd}` Nov 17, 2015
String.prototype.padEnd.js Rename `String#{padLeft,padRight}` → `String#{padStart,padEnd}` Nov 17, 2015
String.prototype.padStart.js Rename `String#{padLeft,padRight}` → `String#{padStart,padEnd}` Nov 17, 2015
String.prototype.trimLeft.js Add `String#trimLeft`, `String#trimLeft` Jul 29, 2015
String.prototype.trimRight.js Add `String#trimLeft`, `String#trimLeft` Jul 29, 2015
bower.json [Fix] fix “main” in bower.json/component.json Mar 19, 2016
browser.js Add `use strict` pragma to everything. Jul 2, 2015
component.json [Fix] fix “main” in bower.json/component.json Mar 19, 2016
es7-shim.js [Breaking] remove `Map#toJSON`/`Set#toJSON`, since they were rejected… Jul 5, 2016
index.js Add `use strict` pragma to everything. Jul 2, 2015
package.json [Tests] remove `parallel shell`; it doesn’t work on node 8 apparently May 31, 2017

README.md

es7-shim Version Badge

npm badge

Build Status dependency status dev dependency status

ECMAScript 7 compatibility shims for legacy JavaScript engines.

es7-shim.js exports an object that contains shims that can be used to monkeypatch a JavaScript context to contain all ECMAScript 7 methods that can be faithfully emulated with a legacy JavaScript engine. es7-shim.browser.js calls the “shim” method on the export of es7-shim.js which actually modifies the global object, including replacing native methods when engine-specific bugs exist. Published on npm are dist/es7-shim.js and dist/es7-shim.min.js which are pre-prepared browserified versions of es7-shim.browser.js.

Source for shims

Every shim in this module is a separate, independent npm module. To be included, all shims must have a ".shim()" method that installs the shim into the global object whenever it is necessary. It should also handle any engine-specific specific to the method it is shimming.

Tests

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

Shims

Array.prototype:

Object:

String.prototype:

Shams

  • ⚠️ None yet!