{"name":"scroll","version":"2.0.0","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+ssh://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":"8bf0f60b8f18fab03dcbbfcddb464f0ec8558e69","_id":"scroll@2.0.0","_shasum":"55cba0d84eb845d98fe3579a801e5722a6a3a81f","_from":".","_npmVersion":"3.9.3","_nodeVersion":"6.2.0","_npmUser":{"name":"michaelrhodes","email":"spam@michaelrhod.es"},"dist":{"shasum":"55cba0d84eb845d98fe3579a801e5722a6a3a81f","tarball":"http://registry-npm.ywwl.com/scroll/download/scroll-2.0.0.tgz","integrity":"sha512-19pntoFfrdiU5EpAotzl6iA6hdShhMuVz4MxkFvcGwt36Oyz6ojIv8FiFkxZ3E13kS8Tc4PR+6BFrqdxIosfgQ==","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEYCIQDIu99qZmYmV2ATv7dDbIrqEEPSneax3nSB9a55mfIJ2AIhAMkRDpRLyFPK7662A+yEKSxRe1YO3Kq2iIlXNuDJD+7Z"}],"size":2213,"noattachment":false,"key":"/scroll/-/scroll-2.0.0.tgz"},"maintainers":[{"name":"michaelrhodes","email":"spam@michaelrhod.es"}],"_npmOperationalInternal":{"host":"packages-12-west.internal.npmjs.com","tmp":"tmp/scroll-2.0.0.tgz_1465332586984_0.47703068633563817"},"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":1465332587543,"_cnpm_publish_time":1465332587543,"dist-tags":{"latest":"3.0.1"}}