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 shimmy with all npm packages installed. Try it out:

var shimmy = require("shimmy")

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

shimmy v0.1.0

Generates a shim for a given browser

node-shimmy Build Status

Node shimmy combines browserspec and polyfill.js to dynamically provide you with source files to make up for broken browsers.

Usage

var shimmy = require('shimmy')
var polyfill = require('polyfill')

shimmy({
    family:'firefox', 
    version:'3.0.1'
}, ["JSON"], polyfill, function(error, shims) {
    // do something with shims
})

Use useragent to parse the user agent:

var shimmy = require('shimmy')
var polyfill = require('polyfill')
var useragent = require('useragent')

var browser = useragent.parse("Mozilla/4.0 (compatible; MSIE 8.0; Windows NT 5.1; .NET CLR 1.1.4322; .NET CLR 1.0.3705)")
shimmy(browser, ["Date.now", "JSON"], polyfill, function(error, shims) {
    // do something with shims
})

License

Open source software under the zlib license.

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