{"name":"raf","version":"2.0.2","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":"~4.1.2","tape":"~2.12.3"},"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"]},"gitHead":"95a952dedeb38c67b000c5f4f92c6fc1f8362abb","bugs":{"url":"https://github.com/chrisdickinson/raf/issues"},"homepage":"https://github.com/chrisdickinson/raf","_id":"raf@2.0.2","_shasum":"b3196848170e55b1df999fe20fa124a116fd9642","_from":".","_npmVersion":"1.4.13","_npmUser":{"name":"cmtegner","email":"christian.tegner@gmail.com"},"maintainers":[{"name":"chrisdickinson","email":"chris@neversaw.us"},{"name":"cmtegner","email":"christian.tegner@gmail.com"}],"dist":{"shasum":"b3196848170e55b1df999fe20fa124a116fd9642","tarball":"http://registry-npm.ywwl.com/raf/download/raf-2.0.2.tgz","integrity":"sha512-HbadQQaG6aEfehfj51ENt3IPfXJIwz9j5EFlLYDSm/xEs8+cOUHqjen97aeOLxgv5+Humbt0ao0RlLmDjrUYxg==","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIHN0zysJsYSR136apFe7I3SD5/FYXOg+NKTK/TrmacHNAiEA+7ZHdRZLf/8TyIVegZ0I8BpF8zkcRQ04RZU0yQCGmu4="}],"size":2456,"noattachment":false,"key":"/raf/-/raf-2.0.2.tgz"},"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":1406572954169,"_cnpm_publish_time":1406572954169,"dist-tags":{"latest":"3.4.1"}}