Skip to content
ECMAScript 7 compatibility shims for legacy JavaScript engines
JavaScript Makefile
Branch: master
Clone or download
Fetching latest commit…
Cannot retrieve the latest commit at this time.
Permalink
Type Name Latest commit message Commit time
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
.jscs.json
.npmignore
.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
Array.prototype.js
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
README.md Fix broken Markdown headings Apr 18, 2017
String.js
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
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
es7-shim.js
index.js
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!
You can’t perform that action at this time.