Sign Up for Free

RunKit +

Try any Node.js package right in your browser

This is a playground to test code. It runs a full Node.js environment and already has all of npm’s 400,000 packages pre-installed, including polyfill with all npm packages installed. Try it out:

var polyfill = require("polyfill")

This service is provided by RunKit and is not affiliated with npm, Inc or the package authors.

polyfill v0.1.0

JavaScript polyfills

Polyfill Build Status

A collection of polyfills for standard JavaScript features.

Notes

This is intended for use with node-shimmy, and not really a standalone module.

Usage

var polyfill = require('polyfill')

polyfill('Array.prototype.forEach', function(error, polyfillSource) {
  // return the JavaScript source for the given polyfill
})

if (polyfill.defines('Date.now')) {
  // check if a polyfill is defined for a given feature name
}

// Print out list of defined polyfill names
console.dir(polyfill.names)

License

Open source software under the zlib license.

Many polyfills based on documentation on MDN and ecmascript.org.

Metadata

RunKit is a free, in-browser JavaScript dev environment for prototyping Node.js code, with every npm package installed. Sign up to share your code.
Sign Up for Free