{"name":"tickedoff","version":"1.0.1","description":"Tiny library for deferring something by a \"tick\"","main":"index.js","repository":{"type":"git","url":"git+https://github.com/jamiebuilds/tickedoff.git"},"author":{"name":"Jamie Kyle","email":"me@thejameskyle.com"},"license":"MIT","keywords":["defer","async","wait","sleep","pause","setTimeout","setImmediate","Promise","process","nextTick","polyfill","ponyfill"],"files":["index.js"],"scripts":{"test":"ava"},"devDependencies":{"ava":"^0.25.0","flow-bin":"^0.68.0"},"gitHead":"1f9e66777dd8b800f1c0a5ec14d47405021ab575","bugs":{"url":"https://github.com/jamiebuilds/tickedoff/issues"},"homepage":"https://github.com/jamiebuilds/tickedoff#readme","_id":"tickedoff@1.0.1","_npmVersion":"5.6.0","_nodeVersion":"8.9.4","_npmUser":{"name":"thejameskyle","email":"me@thejameskyle.com"},"dist":{"integrity":"sha512-ey712Da7rGgHsAVR5P/MWPYGrrksGb/XTO1GbWCvnOggRRnnGJp1ZY+G2OYLJNxL7RgeUz2kzfEayHBzTlBLTw==","shasum":"277c463b5b275dc3c7e7473f8eef804254b9002d","tarball":"http://registry-npm.ywwl.com/tickedoff/download/tickedoff-1.0.1.tgz","fileCount":4,"unpackedSize":2938,"signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEYCIQDPSICIbaCJdmtG5WHaWFd+ZvABHKojI1PLwfr9DLfr9QIhAJ8ooBN08J3HwOICnWhdRWUUzaMum6hxxlKtdOrTQOK4"}],"size":1737,"noattachment":false,"key":"/tickedoff/-/tickedoff-1.0.1.tgz"},"maintainers":[{"name":"thejameskyle","email":"me@thejameskyle.com"}],"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/tickedoff_1.0.1_1522088823186_0.4908819335243544"},"_hasShrinkwrap":false,"readme":"# tickedoff\n\n> Tiny library (<200B gzip) for deferring something by a \"tick\"\n\n- Using `setTimeout` is actually a bit slow because its clamped to 4ms\n- `setImmediate` is not available in most places (and probably never will be)\n- `process.nextTick` is only in Node\n- `Promise#then` needs polyfills in places\n- `tickedoff` uses whatever the best available option is\n- There are more robust libraries/polyfills but they are larger in size\n- This is all especially good for libraries to use\n\n## Install\n\n```sh\nyarn add tickedoff\n```\n\n## Usage\n\n```js\nconst defer = require('tickedoff');\n\nconsole.log(1);\ndefer(() => console.log(3));\nconsole.log(2);\n// 1\n// 2\n// 3\n```\n\n## Perf\n\n```sh\n$ node perf.js\nprocess.nextTick x 10000 = 24ms\nPromise#then x 10000 = 29ms\nsetImmediate x 10000 = 68ms\nsetTimeout x 10000 = 13506ms\n```\n","publish_time":1522088823270,"_cnpm_publish_time":1522088823270,"dist-tags":{"latest":"1.0.2"}}