{"name":"scroll","version":"2.0.1","description":"A function that animates an element’s scrollTop or scrollLeft position.","main":"index.js","dependencies":{"rafl":"~1.2.1"},"devDependencies":{"ease-component":"~1.0.0","tape":"~2.3.2"},"scripts":{"test":"tape test/*.js"},"testling":{"files":"test/*.js","browsers":{"ie":[6,7,8,9,10],"chrome":[20,25,29],"firefox":[3,4,7,19,24],"safari":[5.1,6],"opera":[10,12,15],"iphone":[6],"android":[4.2]}},"repository":{"type":"git","url":"git@github.com:michaelrhodes/scroll.git"},"keywords":["scrollTop","scrollTo","animate"],"author":{"name":"Michael Rhodes"},"license":"MIT","bugs":{"url":"https://github.com/michaelrhodes/scroll/issues"},"homepage":"https://github.com/michaelrhodes/scroll","gitHead":"42a6f762dcf039492793992937b9526a85c32cb5","_id":"scroll@2.0.1","_shasum":"b4c7d27e8bcf3ae8a58a042f27268ae3f55f9ccd","_from":".","_npmVersion":"3.10.9","_nodeVersion":"6.9.2","_npmUser":{"name":"michaelrhodes","email":"spam@michaelrhod.es"},"maintainers":[{"name":"michaelrhodes","email":"spam@michaelrhod.es"}],"dist":{"shasum":"b4c7d27e8bcf3ae8a58a042f27268ae3f55f9ccd","tarball":"http://registry-npm.ywwl.com/scroll/download/scroll-2.0.1.tgz","integrity":"sha512-B/dwAln/DbbLgTnXFl6ZS07zjxVT2oNbOKqyYFuAM6uQW06x/Xki813u9daJKTSic05Cz0KaILu8+FUmOh9bGQ==","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCICf3lQUWcRSHPfQBy9/C380u4FJz+bQz7maALHT+IYi0AiEAlxb6L3hxrBDXMC7FAu7IHn08anS6expn5blH0XIBFbU="}],"size":2315,"noattachment":false,"key":"/scroll/-/scroll-2.0.1.tgz"},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/scroll-2.0.1.tgz_1505533351824_0.10928521165624261"},"directories":{},"readme":"# scroll\nanimates the scroll top/left position of an element (in 340 bytes)\n\n[![browser support](https://ci.testling.com/michaelrhodes/scroll.png)](https://ci.testling.com/michaelrhodes/scroll)\n\nnote: you may need to polyfill [`requestAnimationFrame`](https://caniuse.com/#feat=requestanimationframe) in older browsers\n\n## install\n```sh\nnpm install scroll\n```\n\n## use\n```js\nvar scroll = require('scroll')\nvar page = require('scroll-doc')()\nvar ease = require('ease-component')\n\n// Basic usage\nscroll.left(page, 200)\n\n// Register a callback\nscroll.top(page, 200, function (err, scrollTop) {\n  console.log(err)\n  // { message: \"Scroll cancelled\" } or\n  // { message: \"Element already at target scroll position\" } or\n  // null\n\n  console.log(scrollTop)\n  // => The new scrollTop position of the element\n  // This is always returned, even when there’s an `err`.\n})\n\n// Specify a custom easing function\nscroll.left(page, 200, { ease: ease.inBounce })\n\n// Specify a duration in milliseconds (default: 350) and register a callback.\nscroll.left(page, 200, { duration: 1000 }, function (err, scrollLeft) {\n})\n\n// Cancel a scroll animation\nvar options = { duration: 1000 }\nvar cancel = scroll.top(page, 200, options, function (err, scrollTop) {\n  console.log(err.message)\n  // => Scroll cancelled\n\n  page.removeEventListener('wheel', cancel)\n})\n\npage.addEventListener('wheel', cancel)\n```\n\nnote: the default easing is `inOutSine` from [component/ease](https://github.com/component/ease).\n\n## obey\n[MIT](https://github.com/michaelrhodes/scroll/blob/master/LICENSE)\n","publish_time":1505533351972,"_cnpm_publish_time":1505533351972,"dist-tags":{"latest":"3.0.1"}}