{"name":"scroll","author":{"name":"Michael Rhodes"},"version":"3.0.0","main":"index.js","repository":{"type":"git","url":"git+ssh://git@github.com/michaelrhodes/scroll.git"},"description":"animates the scroll top/left position of an element","keyword":["scrollTop","scrollLeft","scrollTo","animate"],"license":"MIT","scripts":{"test":"tape test.js"},"devDependencies":{"ease-component":"~1.0.0","tape":"~2.3.2"},"gitHead":"2e9ea9824aa1ca7e57c81f349b1e37ef961f7b02","bugs":{"url":"https://github.com/michaelrhodes/scroll/issues"},"homepage":"https://github.com/michaelrhodes/scroll#readme","_id":"scroll@3.0.0","_npmVersion":"6.4.1","_nodeVersion":"10.13.0","_npmUser":{"name":"michaelrhodes","email":"spam@michaelrhod.es"},"dist":{"integrity":"sha512-eDVXNZ0j2/cguLbRFyDlXF7A3xC6+qEVqfwsNwG3uwUZz1/DsKnE1DIB0wKpa6W7/SZhQSvLgROWT2rBBDnlDw==","shasum":"50cd669ee897727b996a3214db0c9c8ebbb7d0cf","tarball":"http://registry-npm.ywwl.com/scroll/download/scroll-3.0.0.tgz","fileCount":5,"unpackedSize":6203,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJcU5QbCRA9TVsSAnZWagAAbxcP/jWKcF4bJ4yKWNVmIOPJ\nb3GiiPUkVk6sLHSxPWAza0QtFZ5CyCVrycI8ad6CfHqVscW7UdMo4T4PKeQe\nqWfqeVh1tIA1uPiPKGtLA1gzYN/nXTlDG5lX/VC1mDb1u3ds2A+NB/sfhMwY\nvbF6iCnBc+LlvGHIDT9z1o8p/bhIRRDrdiLhgz/hBEA36HakqNuRx17yCxyV\npVOeJTuGIQrZ0XLbAs3asYyhzsVmKY3kPQ9+BVtsFqr6EzCZqZn8anhrZwOt\nwmgOVLsekDs6M7sRk2Ig5cM6F+m5uJSFgzwmuAIc7IGSUnFkO9L0QBsLGx8K\n6HFNyHM11+G0AV4OTfDI50ysAFvmd1BucOXfSySq6hPdC/iJEoGuHm+IXc4/\nPcYPCZXOxIE2vba/ZcrT3p2Elu92XRfeRgNIbn9osuvKi3gcPx9fwbMtGcob\nKrw6o2CDq9mOhzIbrhNSe7cSSVIeny+SzviMjlRdsnQZAMSQP4IaLFFahnPP\nxp/Z7+K6Pqhvxl9bYWKGEZF5/CDXB/YfgAkuRM4DWBJKKwDPPX9F/rcd/jBm\nLpTknrgZARzHa+Ljd7/ZtGP3pdiD+EqLKJgFyvrBMSEUleDCsado7H0e1rCe\n6teog8SqJWs+zsatO2lMNCotJ8wYygKBZhKVcYxBohn/JTzdh0uLeh9fAEdh\nowSj\r\n=BW7e\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEYCIQDeLxbLOOcpwk7BSltWGLnf3HWtK3jGwi2Xf7Ccr1Di9gIhAKxbbQ+2KIQ33S1DmscVvwZUaLMlUdfFkME4SbpHt+cB"}],"size":2702,"noattachment":false,"key":"/scroll/-/scroll-3.0.0.tgz"},"maintainers":[{"name":"michaelrhodes","email":"spam@michaelrhod.es"}],"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/scroll_3.0.0_1548981274528_0.27549751788311583"},"_hasShrinkwrap":false,"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":1548981274634,"_cnpm_publish_time":1548981274634,"dist-tags":{"latest":"3.0.1"}}