{"_id":"raf-schd","_rev":"322146","name":"raf-schd","description":"A scheduler based on requestAnimationFrame","dist-tags":{"latest":"4.0.3"},"maintainers":[{"name":"alexreardon","email":"alexreardon@gmail.com"}],"time":{"modified":"2021-06-04T01:28:05.000Z","created":"2017-07-12T23:52:41.401Z","4.0.3":"2021-04-13T02:47:56.193Z","4.0.2":"2019-07-09T01:11:45.909Z","4.0.1":"2019-06-04T00:00:21.598Z","4.0.0":"2018-07-17T05:30:04.577Z","3.0.1":"2018-06-29T04:24:50.364Z","3.0.0":"2018-06-29T04:18:26.902Z","2.1.2":"2018-05-17T10:36:33.557Z","2.1.1":"2018-03-22T23:32:46.255Z","2.1.0":"2017-11-21T22:32:38.149Z","2.0.2":"2017-11-09T00:25:19.129Z","2.0.1":"2017-07-13T01:33:20.553Z","2.0.0":"2017-07-13T00:12:35.263Z","1.0.0":"2017-07-12T23:52:41.401Z"},"users":{"shanewholloway":true},"author":{"name":"Alex Reardon","email":"alexreardon@gmail.com"},"repository":{"type":"git","url":"git+https://github.com/alexreardon/raf-schd.git"},"versions":{"4.0.3":{"name":"raf-schd","version":"4.0.3","description":"A scheduler based on requestAnimationFrame","main":"dist/raf-schd.cjs.js","module":"dist/raf-schd.esm.js","sideEffects":false,"author":{"name":"Alex Reardon","email":"alexreardon@gmail.com"},"license":"MIT","repository":{"type":"git","url":"git+https://github.com/alexreardon/raf-schd.git"},"keywords":["performance","raf","requestAnimationFrame","cancelAnimationFrame"],"config":{"prettier_target":"*.{js,md,json} src/**/*.{js,md,json} test/**/*.{js,md,json}"},"scripts":{"build":"yarn run build:clean && yarn run build:dist && yarn run build:flow","test":"jest","validate":"yarn run prettier:check && yarn run typecheck","prettier:check":"prettier --debug-check $npm_package_config_prettier_target","prettier:write":"prettier --write $npm_package_config_prettier_target","typecheck":"flow check","build:clean":"rimraf dist","build:dist":"rollup -c","build:flow":"echo \"// @flow\n\nexport * from '../src';\" > dist/raf-schd.cjs.js.flow","prepublish":"yarn run build"},"devDependencies":{"@babel/core":"^7.5.0","@babel/preset-env":"^7.5.2","@babel/preset-flow":"^7.0.0","babel-eslint":"10.0.2","babel-jest":"^24.8.0","cross-env":"^5.2.0","flow-bin":"0.102.0","jest":"24.8.0","prettier":"^1.18.2","raf-stub":"3.0.0","rimraf":"^2.6.3","rollup":"^1.16.6","rollup-plugin-babel":"^4.3.3","rollup-plugin-replace":"^2.2.0","rollup-plugin-terser":"^5.1.1"},"dependencies":{},"gitHead":"29b96b83cb7775b05e7b3b35bf6e9ca47d38329b","bugs":{"url":"https://github.com/alexreardon/raf-schd/issues"},"homepage":"https://github.com/alexreardon/raf-schd#readme","_id":"raf-schd@4.0.3","_nodeVersion":"14.15.0","_npmVersion":"6.14.8","dist":{"shasum":"5d6c34ef46f8b2a0e880a8fcdb743efc5bfdbc1a","size":4170,"noattachment":false,"key":"/raf-schd/-/raf-schd-4.0.3.tgz","tarball":"http://registry.cnpm.dingdandao.com/raf-schd/download/raf-schd-4.0.3.tgz"},"_npmUser":{"name":"alexreardon","email":"alexreardon@gmail.com"},"directories":{},"maintainers":[{"name":"alexreardon","email":"alexreardon@gmail.com"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/raf-schd_4.0.3_1618282076063_0.8285155330700555"},"_hasShrinkwrap":false,"publish_time":1618282076193,"_cnpm_publish_time":1618282076193},"4.0.2":{"name":"raf-schd","version":"4.0.2","description":"A scheduler based on requestAnimationFrame","main":"dist/raf-schd.cjs.js","module":"dist/raf-schd.esm.js","sideEffects":false,"author":{"name":"Alex Reardon","email":"alexreardon@gmail.com"},"license":"MIT","repository":{"type":"git","url":"https://github.com/alexreardon/raf-schd.git"},"keywords":["performance","raf","requestAnimationFrame","cancelAnimationFrame"],"config":{"prettier_target":"*.{js,md,json} src/**/*.{js,md,json} test/**/*.{js,md,json}"},"scripts":{"build":"yarn run build:clean && yarn run build:dist && yarn run build:flow","test":"jest","validate":"yarn run prettier:check && yarn run typecheck","prettier:check":"prettier --debug-check $npm_package_config_prettier_target","prettier:write":"prettier --write $npm_package_config_prettier_target","typecheck":"flow check","build:clean":"rimraf dist","build:dist":"rollup -c","build:flow":"echo \"// @flow\n\nexport * from '../src';\" > dist/raf-schd.cjs.js.flow","prepublish":"yarn run build"},"devDependencies":{"@babel/core":"^7.5.0","@babel/preset-env":"^7.5.2","@babel/preset-flow":"^7.0.0","babel-eslint":"10.0.2","babel-jest":"^24.8.0","cross-env":"^5.2.0","flow-bin":"0.102.0","jest":"24.8.0","prettier":"^1.18.2","raf-stub":"3.0.0","rimraf":"^2.6.3","rollup":"^1.16.6","rollup-plugin-babel":"^4.3.3","rollup-plugin-replace":"^2.2.0","rollup-plugin-terser":"^5.1.1"},"dependencies":{},"_id":"raf-schd@4.0.2","dist":{"shasum":"bd44c708188f2e84c810bf55fcea9231bcaed8a0","size":3588,"noattachment":false,"key":"/raf-schd/-/raf-schd-4.0.2.tgz","tarball":"http://registry.cnpm.dingdandao.com/raf-schd/download/raf-schd-4.0.2.tgz"},"maintainers":[{"name":"alexreardon","email":"alexreardon@gmail.com"}],"_npmUser":{"name":"alexreardon","email":"alexreardon@gmail.com"},"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/raf-schd_4.0.2_1562634705539_0.5007543657239522"},"_hasShrinkwrap":false,"publish_time":1562634705909,"_cnpm_publish_time":1562634705909},"4.0.1":{"name":"raf-schd","version":"4.0.1","description":"A scheduler based on requestAnimationFrame","main":"dist/raf-schd.cjs.js","module":"dist/raf-schd.esm.js","sideEffects":false,"author":{"name":"Alex Reardon","email":"alexreardon@gmail.com"},"license":"MIT","repository":{"type":"git","url":"https://github.com/alexreardon/raf-schd.git"},"keywords":["performance","raf","requestAnimationFrame","cancelAnimationFrame"],"config":{"prettier_target":"*.{js,md,json} src/**/*.{js,md,json} test/**/*.{js,md,json}"},"scripts":{"build":"yarn run build:clean && yarn run build:dist && yarn run build:flow","test":"jest","validate":"yarn run prettier:check && yarn run typecheck","prettier:check":"prettier --debug-check $npm_package_config_prettier_target","prettier:write":"prettier --write $npm_package_config_prettier_target","typecheck":"flow check","build:clean":"rimraf dist","build:dist":"rollup -c","build:flow":"echo \"// @flow\n\nexport * from '../src';\" > dist/raf-schd.cjs.js.flow","prepublish":"yarn run build"},"devDependencies":{"@babel/core":"^7.4.5","@babel/preset-env":"^7.4.5","@babel/preset-flow":"^7.0.0","babel-eslint":"10.0.1","babel-jest":"^24.8.0","cross-env":"^5.2.0","flow-bin":"0.100.0","jest":"24.8.0","prettier":"^1.17.1","raf-stub":"2.0.2","rimraf":"^2.6.3","rollup":"^1.13.1","rollup-plugin-babel":"^4.3.2","rollup-plugin-replace":"^2.2.0","rollup-plugin-terser":"^5.0.0"},"dependencies":{},"_id":"raf-schd@4.0.1","dist":{"shasum":"e72f29a96de260dead719f34c29e56fdc1c1473e","size":3580,"noattachment":false,"key":"/raf-schd/-/raf-schd-4.0.1.tgz","tarball":"http://registry.cnpm.dingdandao.com/raf-schd/download/raf-schd-4.0.1.tgz"},"maintainers":[{"name":"alexreardon","email":"alexreardon@gmail.com"}],"_npmUser":{"name":"alexreardon","email":"alexreardon@gmail.com"},"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/raf-schd_4.0.1_1559606421395_0.7173800638397929"},"_hasShrinkwrap":false,"publish_time":1559606421598,"_cnpm_publish_time":1559606421598},"4.0.0":{"name":"raf-schd","version":"4.0.0","description":"A scheduler based on requestAnimationFrame","main":"dist/raf-schd.cjs.js","module":"dist/raf-schd.esm.js","sideEffects":false,"files":["/dist","/src"],"author":{"name":"Alex Reardon","email":"alexreardon@gmail.com"},"license":"MIT","repository":{"type":"git","url":"git+https://github.com/alexreardon/raf-schd.git"},"keywords":["performance","raf","requestAnimationFrame","cancelAnimationFrame"],"config":{"prettier_target":"*.{js,md,json} src/**/*.{js,md,json} test/**/*.{js,md,json}"},"scripts":{"build":"yarn run build:clean && yarn run build:dist && yarn run build:flow","test":"jest","validate":"yarn run prettier:check && yarn run typecheck","prettier:check":"prettier --debug-check $npm_package_config_prettier_target","prettier:write":"prettier --write $npm_package_config_prettier_target","typecheck":"flow check","build:clean":"rimraf dist","build:dist":"rollup -c","build:flow":"echo \"// @flow\n\nexport * from '../src';\" > dist/raf-schd.cjs.js.flow","prepublish":"yarn run build"},"devDependencies":{"babel-cli":"6.26.0","babel-eslint":"8.2.5","babel-jest":"^23.2.0","babel-preset-env":"^1.7.0","babel-preset-flow":"6.23.0","cross-env":"^5.2.0","flow-bin":"0.75.0","jest":"23.2.0","prettier":"^1.13.7","raf-stub":"2.0.2","rimraf":"^2.6.2","rollup":"^0.62.0","rollup-plugin-babel":"^3.0.5","rollup-plugin-commonjs":"^9.1.3","rollup-plugin-replace":"^2.0.0","rollup-plugin-uglify":"^4.0.0"},"dependencies":{},"gitHead":"21d401b5f7cdcbf235915662526467afaacb9976","bugs":{"url":"https://github.com/alexreardon/raf-schd/issues"},"homepage":"https://github.com/alexreardon/raf-schd#readme","_id":"raf-schd@4.0.0","_npmVersion":"6.1.0","_nodeVersion":"8.11.3","_npmUser":{"name":"alexreardon","email":"alexreardon@gmail.com"},"dist":{"shasum":"9855756c5045ff4ed4516e14a47719387c3c907b","size":3312,"noattachment":false,"key":"/raf-schd/-/raf-schd-4.0.0.tgz","tarball":"http://registry.cnpm.dingdandao.com/raf-schd/download/raf-schd-4.0.0.tgz"},"maintainers":[{"name":"alexreardon","email":"alexreardon@gmail.com"}],"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/raf-schd_4.0.0_1531805404503_0.8608199793695572"},"_hasShrinkwrap":false,"publish_time":1531805404577,"_cnpm_publish_time":1531805404577},"3.0.1":{"name":"raf-schd","version":"3.0.1","description":"A scheduler based on requestAnimationFrame","main":"dist/raf-schd.cjs.js","module":"dist/raf-schd.esm.js","sideEffects":false,"files":["/dist","/src"],"author":{"name":"Alex Reardon","email":"alexreardon@gmail.com"},"license":"MIT","repository":{"type":"git","url":"git+https://github.com/alexreardon/raf-schd.git"},"keywords":["performance","raf","requestAnimationFrame","cancelAnimationFrame"],"scripts":{"build":"yarn run build:clean && yarn run build:dist && yarn run build:flow","test":"jest","validate":"yarn run lint && yarn run typecheck","lint":"eslint src test","typecheck":"flow check","build:clean":"rimraf dist","build:dist":"rollup -c","build:flow":"echo \"// @flow\n\nexport * from '../src';\" > dist/raf-schd.cjs.js.flow","prepublish":"yarn run build"},"devDependencies":{"babel-cli":"6.26.0","babel-eslint":"8.2.5","babel-jest":"^23.2.0","babel-preset-env":"^1.7.0","babel-preset-flow":"6.23.0","cross-env":"^5.2.0","eslint":"5.0.1","eslint-plugin-flowtype":"^2.49.3","eslint-plugin-jest":"21.17.0","flow-bin":"0.75.0","jest":"23.2.0","raf-stub":"2.0.2","rimraf":"^2.6.2","rollup":"^0.62.0","rollup-plugin-babel":"^3.0.5","rollup-plugin-commonjs":"^9.1.3","rollup-plugin-replace":"^2.0.0","rollup-plugin-uglify":"^4.0.0"},"dependencies":{},"gitHead":"f31275933171d86a1dbe941f723c7fcc8d482650","bugs":{"url":"https://github.com/alexreardon/raf-schd/issues"},"homepage":"https://github.com/alexreardon/raf-schd#readme","_id":"raf-schd@3.0.1","_npmVersion":"5.6.0","_nodeVersion":"8.11.3","_npmUser":{"name":"alexreardon","email":"alexreardon@gmail.com"},"dist":{"shasum":"ec78eb6078b067748ec77f30b45a19957955f334","size":3637,"noattachment":false,"key":"/raf-schd/-/raf-schd-3.0.1.tgz","tarball":"http://registry.cnpm.dingdandao.com/raf-schd/download/raf-schd-3.0.1.tgz"},"maintainers":[{"name":"alexreardon","email":"alexreardon@gmail.com"}],"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/raf-schd_3.0.1_1530246290309_0.10645247395501323"},"_hasShrinkwrap":false,"publish_time":1530246290364,"_cnpm_publish_time":1530246290364},"3.0.0":{"name":"raf-schd","version":"3.0.0","description":"A simple scheduler based on requestAnimationFrame","main":"lib/index.js","module":"esm/index.js","sideEffects":false,"files":["/lib","/esm","/src"],"author":{"name":"Alex Reardon","email":"alexreardon@gmail.com"},"license":"MIT","repository":{"type":"git","url":"git+https://github.com/alexreardon/raf-schd.git"},"keywords":["performance","raf","requestAnimationFrame","cancelAnimationFrame"],"scripts":{"build":"yarn run build:clean && yarn run build:dist && yarn run build:flow","test":"jest","validate":"yarn run lint && yarn run typecheck","lint":"eslint src test","typecheck":"flow check","build:clean":"rimraf dist","build:dist":"rollup -c","build:flow":"echo \"// @flow\n\nexport * from '../src';\" > dist/raf-schd.cjs.js.flow","prepublish":"yarn run build"},"devDependencies":{"babel-cli":"6.26.0","babel-eslint":"8.2.5","babel-jest":"^23.2.0","babel-preset-env":"^1.7.0","babel-preset-flow":"6.23.0","cross-env":"^5.2.0","eslint":"5.0.1","eslint-plugin-flowtype":"^2.49.3","eslint-plugin-jest":"21.17.0","flow-bin":"0.75.0","jest":"23.2.0","raf-stub":"2.0.2","rimraf":"^2.6.2","rollup":"^0.62.0","rollup-plugin-babel":"^3.0.5","rollup-plugin-commonjs":"^9.1.3","rollup-plugin-replace":"^2.0.0","rollup-plugin-uglify":"^4.0.0"},"dependencies":{},"gitHead":"2d5f29005c6482d9a16d6edf1425586eaaafd117","bugs":{"url":"https://github.com/alexreardon/raf-schd/issues"},"homepage":"https://github.com/alexreardon/raf-schd#readme","_id":"raf-schd@3.0.0","_npmVersion":"5.6.0","_nodeVersion":"8.11.3","_npmUser":{"name":"alexreardon","email":"alexreardon@gmail.com"},"dist":{"shasum":"2098d3a2d52774f192908b6b5f71adde7cf77740","size":2964,"noattachment":false,"key":"/raf-schd/-/raf-schd-3.0.0.tgz","tarball":"http://registry.cnpm.dingdandao.com/raf-schd/download/raf-schd-3.0.0.tgz"},"maintainers":[{"name":"alexreardon","email":"alexreardon@gmail.com"}],"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/raf-schd_3.0.0_1530245906840_0.14250267875254186"},"_hasShrinkwrap":false,"publish_time":1530245906902,"_cnpm_publish_time":1530245906902},"2.1.2":{"name":"raf-schd","version":"2.1.2","description":"A simple scheduler based on requestAnimationFrame","main":"lib/index.js","module":"esm/index.js","sideEffects":false,"files":["/lib","/esm","/src"],"author":{"name":"Alex Reardon","email":"alexreardon@gmail.com"},"license":"MIT","repository":{"type":"git","url":"git+https://github.com/alexreardon/raf-schd.git"},"keywords":["performance","raf","requestAnimationFrame","cancelAnimationFrame"],"scripts":{"build":"yarn run build:clean && yarn run build:lib && yarn run build:esm && yarn run build:flow","test":"jest","validate":"yarn run lint && yarn run typecheck","lint":"eslint src test","typecheck":"flow check","build:clean":"rimraf lib esm","build:lib":"cross-env NODE_ENV=cjs babel src -d lib","build:esm":"babel src --out-dir esm","build:flow":"echo \"// @flow\n\nexport * from '../src';\" > lib/index.js.flow","prepublish":"yarn run build"},"devDependencies":{"babel-cli":"6.26.0","babel-eslint":"8.2.2","babel-jest":"^22.4.3","babel-preset-env":"^1.6.1","babel-preset-flow":"6.23.0","cross-env":"^5.1.4","eslint":"4.19.1","eslint-plugin-flowtype":"^2.46.1","eslint-plugin-jest":"21.15.0","flow-bin":"0.68.0","jest":"22.4.3","raf-stub":"2.0.2","rimraf":"^2.6.2"},"dependencies":{},"gitHead":"5cab6dc65982b58aebcda8b1880443697fcbe9b3","bugs":{"url":"https://github.com/alexreardon/raf-schd/issues"},"homepage":"https://github.com/alexreardon/raf-schd#readme","_id":"raf-schd@2.1.2","_npmVersion":"6.0.0","_nodeVersion":"8.4.0","_npmUser":{"name":"alexreardon","email":"alexreardon@gmail.com"},"dist":{"shasum":"ec622b5167f2912089f054dc03ebd5bcf33c8f62","size":3209,"noattachment":false,"key":"/raf-schd/-/raf-schd-2.1.2.tgz","tarball":"http://registry.cnpm.dingdandao.com/raf-schd/download/raf-schd-2.1.2.tgz"},"maintainers":[{"name":"alexreardon","email":"alexreardon@gmail.com"}],"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/raf-schd_2.1.2_1526553393507_0.735121344480778"},"_hasShrinkwrap":false,"publish_time":1526553393557,"_cnpm_publish_time":1526553393557},"2.1.1":{"name":"raf-schd","version":"2.1.1","description":"A simple scheduler based on requestAnimationFrame","main":"lib/index.js","module":"esm/index.js","sideEffects":false,"files":["/lib","/esm","/src"],"author":{"name":"Alex Reardon","email":"alexreardon@gmail.com"},"license":"MIT","repository":{"type":"git","url":"git+https://github.com/alexreardon/raf-schd.git"},"keywords":["performance","raf","requestAnimationFrame","cancelAnimationFrame"],"scripts":{"build":"yarn run build:clean && yarn run build:lib && yarn run build:esm && yarn run build:flow","test":"jest","validate":"yarn run lint && yarn run typecheck","lint":"eslint src test","typecheck":"flow check","build:clean":"rimraf lib esm","build:lib":"cross-env NODE_ENV=cjs babel src -d lib","build:esm":"babel src --out-dir esm","build:flow":"flow-copy-source --verbose src lib && flow-copy-source --verbose src esm","prepublish":"yarn run build"},"devDependencies":{"babel-cli":"6.26.0","babel-eslint":"8.2.2","babel-jest":"^22.4.3","babel-preset-env":"^1.6.1","babel-preset-flow":"6.23.0","cross-env":"^5.1.4","eslint":"4.19.1","eslint-plugin-flowtype":"^2.46.1","eslint-plugin-jest":"21.15.0","flow-bin":"0.68.0","flow-copy-source":"^1.3.0","jest":"22.4.3","raf-stub":"2.0.2","rimraf":"^2.6.2"},"dependencies":{},"gitHead":"8bb49e9401c222671166f00c1647004312384e60","bugs":{"url":"https://github.com/alexreardon/raf-schd/issues"},"homepage":"https://github.com/alexreardon/raf-schd#readme","_id":"raf-schd@2.1.1","_npmVersion":"5.5.1","_nodeVersion":"8.4.0","_npmUser":{"name":"alexreardon","email":"alexreardon@gmail.com"},"dist":{"shasum":"0b59964cee2e96b7dd46ffaeb5c08740f3a5e7ab","size":3253,"noattachment":false,"key":"/raf-schd/-/raf-schd-2.1.1.tgz","tarball":"http://registry.cnpm.dingdandao.com/raf-schd/download/raf-schd-2.1.1.tgz"},"maintainers":[{"name":"alexreardon","email":"alexreardon@gmail.com"}],"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/raf-schd_2.1.1_1521761566202_0.052662841884503875"},"_hasShrinkwrap":false,"publish_time":1521761566255,"_cnpm_publish_time":1521761566255},"2.1.0":{"name":"raf-schd","version":"2.1.0","description":"A simple scheduler based on requestAnimationFrame","main":"lib/index.js","files":["lib"],"scripts":{"build":"babel src -d lib","test":"jest","validate":"yarn run lint && yarn run typecheck","lint":"eslint src test","typecheck":"flow check","prepublish":"yarn run build"},"devDependencies":{"babel-cli":"6.26.0","babel-eslint":"8.0.2","babel-jest":"^21.2.0","babel-preset-es2015":"6.24.1","babel-preset-flow":"6.23.0","eslint":"4.11.0","eslint-plugin-jest":"21.3.2","flow-bin":"0.59.0","jest":"21.2.1","prettier":"1.8.2","raf-stub":"2.0.1"},"dependencies":{},"author":{"name":"Alex Reardon","email":"alexreardon@gmail.com"},"license":"MIT","repository":{"type":"git","url":"git+https://github.com/alexreardon/raf-schd.git"},"keywords":["performance","raf","requestAnimationFrame","cancelAnimationFrame"],"gitHead":"224ef890de0c93badfe198dd0d938972102b01a8","bugs":{"url":"https://github.com/alexreardon/raf-schd/issues"},"homepage":"https://github.com/alexreardon/raf-schd#readme","_id":"raf-schd@2.1.0","_npmVersion":"5.5.1","_nodeVersion":"8.4.0","_npmUser":{"name":"alexreardon","email":"alexreardon@gmail.com"},"dist":{"shasum":"64d645723380ec25cc1714e909b953ef1cf254bf","size":2845,"noattachment":false,"key":"/raf-schd/-/raf-schd-2.1.0.tgz","tarball":"http://registry.cnpm.dingdandao.com/raf-schd/download/raf-schd-2.1.0.tgz"},"maintainers":[{"name":"alexreardon","email":"alexreardon@gmail.com"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/raf-schd-2.1.0.tgz_1511303558080_0.9668802283704281"},"directories":{},"publish_time":1511303558149,"_hasShrinkwrap":false,"_cnpm_publish_time":1511303558149},"2.0.2":{"name":"raf-schd","version":"2.0.2","description":"A simple scheduler based on requestAnimationFrame","main":"lib/index.js","files":["lib"],"scripts":{"build":"babel src -d lib","test":"jest","validate":"yarn run lint && yarn run typecheck","lint":"eslint src test","typecheck":"flow check","prepublish":"yarn run build"},"devDependencies":{"babel-cli":"6.26.0","babel-eslint":"8.0.2","babel-jest":"^21.2.0","babel-preset-es2015":"6.24.1","babel-preset-flow":"6.23.0","eslint":"4.10.0","eslint-plugin-jest":"21.2.0","flow-bin":"0.58.0","jest":"21.2.1","prettier":"1.8.1","raf-stub":"2.0.1"},"dependencies":{},"author":{"name":"Alex Reardon","email":"alexreardon@gmail.com"},"license":"MIT","repository":{"type":"git","url":"git+https://github.com/alexreardon/raf-schd.git"},"keywords":["performance","raf","requestAnimationFrame","cancelAnimationFrame"],"gitHead":"b2fb5567c954dd92886f8ef6343e5f29a4f9a4e1","bugs":{"url":"https://github.com/alexreardon/raf-schd/issues"},"homepage":"https://github.com/alexreardon/raf-schd#readme","_id":"raf-schd@2.0.2","_npmVersion":"5.5.1","_nodeVersion":"8.4.0","_npmUser":{"name":"alexreardon","email":"alexreardon@gmail.com"},"dist":{"shasum":"7cf60f260c2d97ba2ba2a448c73604c5bed8cf08","size":2628,"noattachment":false,"key":"/raf-schd/-/raf-schd-2.0.2.tgz","tarball":"http://registry.cnpm.dingdandao.com/raf-schd/download/raf-schd-2.0.2.tgz"},"maintainers":[{"name":"alexreardon","email":"alexreardon@gmail.com"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/raf-schd-2.0.2.tgz_1510187118979_0.4959460909012705"},"directories":{},"publish_time":1510187119129,"_hasShrinkwrap":false,"_cnpm_publish_time":1510187119129},"2.0.1":{"name":"raf-schd","version":"2.0.1","description":"A simple scheduler based on requestAnimationFrame","main":"lib/index.js","scripts":{"build":"babel src -d lib","test":"jest","validate":"yarn run lint && yarn run typecheck","lint":"eslint src test","typecheck":"flow check","prepublish":"yarn run build"},"devDependencies":{"babel-cli":"6.24.1","babel-eslint":"7.2.3","babel-preset-es2015":"6.24.1","babel-preset-flow":"6.23.0","eslint":"4.2.0","eslint-plugin-jest":"20.0.3","flow-bin":"0.49.1","jest":"20.0.4","prettier":"1.5.2","raf-stub":"2.0.1"},"dependencies":{},"author":{"name":"Alex Reardon","email":"alexreardon@gmail.com"},"license":"MIT","repository":{"type":"git","url":"git+https://github.com/alexreardon/raf-schd.git"},"keywords":["performance","raf","requestAnimationFrame","cancelAnimationFrame"],"gitHead":"8c1488e6caadd22237ef93cc64c74c336b1a8f42","bugs":{"url":"https://github.com/alexreardon/raf-schd/issues"},"homepage":"https://github.com/alexreardon/raf-schd#readme","_id":"raf-schd@2.0.1","_shasum":"c5094a080344edb7fee00de48adf023686f9c915","_from":".","_npmVersion":"3.10.10","_nodeVersion":"6.9.4","_npmUser":{"name":"alexreardon","email":"alexreardon@gmail.com"},"dist":{"shasum":"c5094a080344edb7fee00de48adf023686f9c915","size":39338,"noattachment":false,"key":"/raf-schd/-/raf-schd-2.0.1.tgz","tarball":"http://registry.cnpm.dingdandao.com/raf-schd/download/raf-schd-2.0.1.tgz"},"maintainers":[{"name":"alexreardon","email":"alexreardon@gmail.com"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/raf-schd-2.0.1.tgz_1499909600077_0.7736685471609235"},"directories":{},"publish_time":1499909600553,"_hasShrinkwrap":false,"_cnpm_publish_time":1499909600553},"2.0.0":{"name":"raf-schd","version":"2.0.0","description":"A simple scheduler based on requestAnimationFrame","main":"lib/index.js","scripts":{"build":"babel src -d lib","test":"jest","validate":"yarn run lint && yarn run typecheck","lint":"eslint src test","typecheck":"flow check","prepublish":"yarn run build"},"devDependencies":{"babel-cli":"6.24.1","babel-eslint":"7.2.3","babel-preset-es2015":"6.24.1","babel-preset-flow":"6.23.0","eslint":"4.2.0","eslint-plugin-jest":"20.0.3","flow-bin":"0.49.1","jest":"20.0.4","prettier":"1.5.2","raf-stub":"2.0.1"},"dependencies":{},"author":{"name":"Alex Reardon","email":"alexreardon@gmail.com"},"license":"MIT","repository":{"type":"git","url":"git+https://github.com/alexreardon/raf-schd.git"},"keywords":["performance","raf","requestAnimationFrame","cancelAnimationFrame"],"gitHead":"9001485895f75b67485dcaf8e3c23934e2a32e46","bugs":{"url":"https://github.com/alexreardon/raf-schd/issues"},"homepage":"https://github.com/alexreardon/raf-schd#readme","_id":"raf-schd@2.0.0","_shasum":"67d40c076e24b6e6a8b61fc2c16effbd2b9940a5","_from":".","_npmVersion":"3.10.10","_nodeVersion":"6.9.4","_npmUser":{"name":"alexreardon","email":"alexreardon@gmail.com"},"dist":{"shasum":"67d40c076e24b6e6a8b61fc2c16effbd2b9940a5","size":38080,"noattachment":false,"key":"/raf-schd/-/raf-schd-2.0.0.tgz","tarball":"http://registry.cnpm.dingdandao.com/raf-schd/download/raf-schd-2.0.0.tgz"},"maintainers":[{"name":"alexreardon","email":"alexreardon@gmail.com"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/raf-schd-2.0.0.tgz_1499904755130_0.32367472420446575"},"directories":{},"publish_time":1499904755263,"_hasShrinkwrap":false,"_cnpm_publish_time":1499904755263},"1.0.0":{"name":"raf-schd","version":"1.0.0","description":"A simple scheduler based on requestAnimationFrame","main":"lib/index.js","scripts":{"build":"babel src -d lib","test":"jest","validate":"yarn run lint && yarn run typecheck","lint":"eslint src test","typecheck":"flow check"},"devDependencies":{"babel-cli":"6.24.1","babel-eslint":"7.2.3","babel-preset-es2015":"6.24.1","babel-preset-flow":"6.23.0","eslint":"4.2.0","eslint-plugin-jest":"20.0.3","flow-bin":"0.49.1","jest":"20.0.4","prettier":"1.5.2","raf-stub":"2.0.1"},"dependencies":{},"author":{"name":"Alex Reardon","email":"alexreardon@gmail.com"},"license":"MIT","repository":{"type":"git","url":"git+https://github.com/alexreardon/raf-schd.git"},"keywords":["performance","raf","requestAnimationFrame","cancelAnimationFrame"],"gitHead":"3f420dc68b0d691fe422df9a2996b297bf2e79ba","bugs":{"url":"https://github.com/alexreardon/raf-schd/issues"},"homepage":"https://github.com/alexreardon/raf-schd#readme","_id":"raf-schd@1.0.0","_shasum":"777ac098f18ae44c0350b757cb355ac4148c2341","_from":".","_npmVersion":"3.10.10","_nodeVersion":"6.9.4","_npmUser":{"name":"alexreardon","email":"alexreardon@gmail.com"},"dist":{"shasum":"777ac098f18ae44c0350b757cb355ac4148c2341","size":38036,"noattachment":false,"key":"/raf-schd/-/raf-schd-1.0.0.tgz","tarball":"http://registry.cnpm.dingdandao.com/raf-schd/download/raf-schd-1.0.0.tgz"},"maintainers":[{"name":"alexreardon","email":"alexreardon@gmail.com"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/raf-schd-1.0.0.tgz_1499903561268_0.9076863001100719"},"directories":{},"publish_time":1499903561401,"_hasShrinkwrap":false,"_cnpm_publish_time":1499903561401}},"readme":"# raf-schd\n\nA `throttle` function that uses [`requestAnimationFrame`](https://developer.mozilla.org/en-US/docs/Web/API/window/requestAnimationFrame) to limit the rate at which a function is called.\n\n[![Build Status](https://travis-ci.org/alexreardon/raf-schd.svg?branch=master)](https://travis-ci.org/alexreardon/raf-schd) [![dependencies](https://david-dm.org/alexreardon/raf-schd.svg)](https://david-dm.org/alexreardon/raf-schd) [![npm](https://img.shields.io/npm/v/raf-schd.svg)](https://www.npmjs.com/package/raf-schd) [![SemVer](https://img.shields.io/badge/SemVer-2.0.0-brightgreen.svg)](http://semver.org/spec/v2.0.0.html)\n\n> For background information on rate limiting functions, see [Rate limiting functions from scratch](https://www.youtube.com/watch?v=g_3e_bNU2e0)\n\n```js\nimport rafSchd from 'raf-schd';\n\nconst expensiveFn = arg => {\n  //...\n  console.log(arg);\n};\n\nconst schedule = rafSchd(expensiveFn);\n\nschedule('foo');\nschedule('bar');\nschedule('baz');\n\n// animation frame fires\n\n// => 'baz'\n```\n\n## Why?\n\n`raf-schd` supports the use case where you want to limit the rate at which your functions are called based on `requestAnimationFrame`. Unlike a standard `throttle` function, `raf-schd` uses `requestAnimationFrame` to rate limit, rather than waiting a fixed amount of time. Using `requestAnimationFrame` for throttling is powerful because the browser will automatically reduce the amount of frames provided based on the available resources. So if the browser only provides 30fps then your throttled function will only be called 30 times.\n\n`raf-schd` is an **extremely** useful performance utility.\n\n### Without `raf-schd`\n\n> Optimised scroll listener example taken from [MDN](https://developer.mozilla.org/en-US/docs/Web/Events/scroll)\n\n```js\nvar last_known_scroll_position = 0;\nvar ticking = false;\n\nfunction doSomething(scroll_pos) {\n  // do something with the scroll position\n}\n\nwindow.addEventListener('scroll', function(e) {\n  last_known_scroll_position = window.scrollY;\n  if (!ticking) {\n    window.requestAnimationFrame(function() {\n      doSomething(last_known_scroll_position);\n      ticking = false;\n    });\n  }\n  ticking = true;\n});\n```\n\n### With `raf-schd`\n\n```js\nimport rafSchd from 'raf-schd';\n\nfunction doSomething(scroll_pos) {\n  // do something with the scroll position\n}\n\nconst schedule = rafSchd(doSomething);\n\nwindow.addEventListener('scroll', function() {\n  schedule(window.scrollY);\n});\n```\n\nAt the top level `raf-schd` accepts any function a returns a new `ResultFn` (a function that wraps your original function).\n\nThe `ResultFn` will execute your function with the **latest arguments** provided to it on the next animation frame.\n\n### Throttled with latest argument\n\n```js\nimport rafSchd from 'raf-schd';\n\nconst doSomething = () => {...};\n\nconst schedule = rafSchd(doSomething);\n\nschedule(1, 2);\nschedule(3, 4);\nschedule(5, 6);\n\n// animation frame fires\n\n// do something called with => '5, 6'\n```\n\n### Cancelling a frame with `.cancel`\n\n`raf-schd` adds a `.cancel` property to the `ResultFn` so that it can be easily cancelled. The frame will only be cancelled if it has not yet executed.\n\n```js\nconst schedule = rafSchd(doSomething);\n\nschedule('foo');\n\nschedule.cancel();\n\n// now doSomething will not be executed in the next animation frame\n```\n\n## Types\n\n### `rafSchedule`\n\n```js\ntype rafSchedule = (fn: Function) => ResultFn;\n\n// Adding a .cancel property to the WrapperFn\n\ntype WrapperFn = (...arg: mixed[]) => void;\ntype CancelFn = {|\n  cancel: () => void,\n|};\ntype ResultFn = WrapperFn & CancelFn;\n```\n\n## Testing your code\n\nIf you want to really ensure that your code is working how you intend it to - use [`raf-stub`](https://github.com/alexreardon/raf-stub) to test your animation frame logic.\n\n## Installation\n\n```bash\n# yarn\nyarn add raf-schd\n\n# npm\nnpm install raf-schd --save\n```\n\n## Module usage\n\n### ES6 module\n\n```js\nimport rafSchd from 'raf-schd';\n```\n\n### CommonJS\n\nIf you are in a CommonJS environment (eg [Node](https://nodejs.org)), then **you will need add `.default` to your import**:\n\n```js\nconst rafSchd = require('raf-schd').default;\n```\n","_attachments":{},"homepage":"https://github.com/alexreardon/raf-schd#readme","bugs":{"url":"https://github.com/alexreardon/raf-schd/issues"},"license":"MIT"}