{"name":"raf","version":"1.0.0","description":"requestAnimationFrame polyfill for node and the browser","main":"index.js","scripts":{"testling":"browserify test.js | testling","test":"node test.js"},"repository":{"type":"git","url":"git://github.com/chrisdickinson/raf.git"},"keywords":["requestAnimationFrame","polyfill"],"author":{"name":"Chris Dickinson","email":"chris@neversaw.us"},"contributors":[{"name":"Christian Maughan Tegnér","email":"christian.tegner@gmail.com"}],"license":"MIT","devDependencies":{"testling":"^1.6.1","browserify":"^3.46.0","tape":"~2.11.0"},"dependencies":{"performance-now":"^0.1.3"},"testling":{"files":"test.js","browsers":["iexplore/6.0..latest","firefox/3.0..6.0","firefox/15.0..latest","firefox/nightly","chrome/4.0..10.0","chrome/20.0..latest","chrome/canary","opera/10.0..latest","opera/next","safari/4.0..latest","ipad/6.0..latest","iphone/6.0..latest"]},"bugs":{"url":"https://github.com/chrisdickinson/raf/issues"},"homepage":"https://github.com/chrisdickinson/raf","_id":"raf@1.0.0","dist":{"shasum":"a8444ecbec4db988692159c1a5c542243459bc44","tarball":"http://registry-npm.ywwl.com/raf/download/raf-1.0.0.tgz","integrity":"sha512-eHzElzy6KOLxpVrWVmvlBwOgl2aQWOKPzjU4RdBh6zbfTETZ79xm6JOf76BMoaLyHHWOlzLnZanUaFtgBYZN1g==","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIQCDDI7XPzb8HYQhlT5dh0eJVQyiYLiNwg4bNy85CZbfCAIgR+gOmw0IkPDKPNHBWc97iPkYYxzluRRZpHhP8f6q1us="}],"size":2355,"noattachment":false,"key":"/raf/-/raf-1.0.0.tgz"},"_from":".","_npmVersion":"1.4.3","_npmUser":{"name":"chrisdickinson","email":"chris@neversaw.us"},"maintainers":[{"name":"chrisdickinson","email":"chris@neversaw.us"}],"directories":{},"readme":"# raf\n\n[![Browser Support](http://ci.testling.com/chrisdickinson/raf.png)](http://ci.testling.com/chrisdickinson/raf)\n\nrequestAnimationFrame polyfill for node and the browser.\n\n```js\nvar raf = require('raf')\n\nraf(function tick() {\n  // Animation logic\n  raf(tick)\n})\n```\n\n**Note:** The stream/event emitter logic found in versions prior to 1.0.0 can be found in [raf-stream](https://www.npmjs.org/package/raf-stream).\n\n## Getting started\n\n### CommonJS (Node, Browserify, Webpack, etc.)\n\nInstall `raf` from npm:\n\n```bash\nnpm install --save raf\n```\n\nRequire it like you would any other module:\n\n```js\nconst raf = require('raf')\n```\n\n### AMD (require.js, etc)\n\nDownload the UMD-bundle from [wzrd.in](https://wzrd.in/standalone/raf@latest) (remember to include the current version number in the filename).\n\nAdd it to your AMD module loader config and require it like you would any other module:\n\n```html\ndefine(['raf'], raf => {...})\n```\n\n### `<script>`\n\nDownload the UMD-bundle from [wzrd.in](https://wzrd.in/standalone/raf@latest) (remember to include the current version number in the filename).\n\nThen include it via a script tag:\n\n```html\n<script src=\"raf-x.x.x.js\"></script>\n```\n\nThe API will be available on `window.raf`.\n\n## API\n\n[Documentation at Mozilla Developer Network](https://developer.mozilla.org/en-US/docs/Web/API/window.requestAnimationFrame), [W3 Specification](http://www.w3.org/TR/animation-timing/#requestAnimationFrame)\n\n### var handle = raf(callback)\n\n`callback` is the function to invoke in the next frame. `handle` is a long integer value that uniquely identifies the entry in the callback list. This is a non-zero value, but you may not make any other assumptions about its value.\n\n### raf.cancel(handle)\n\n`handle` is the entry identifier returned by `raf()`. Removes the queued animation frame callback (other queued callbacks will still be invoked unless cancelled).\n\n### raf.polyfill([object])\n\nShorthand to polyfill `window.requestAnimationFrame` and `window.cancelAnimationFrame` if necessary (Polyfills `global` in node).\n\nAlternatively you can require `raf/polyfill` which will act the same as `require('raf').polyfill()`.\n\nIf you provide `object` the polyfills are attached to that given object, instead of the inferred global.\nUseful if you have an instance of a fake `window` object, and want to add `raf` and `caf` to it.\n\n## Acknowledgments\n\nBased on work by Erik Möller, Paul Irish, and Tino Zijdel (https://gist.github.com/paulirish/1579671)\n\n## License\n\nMIT\n","publish_time":1400050189666,"_cnpm_publish_time":1400050189666,"dist-tags":{"latest":"3.4.1"}}