{"name":"tickedoff","version":"1.0.0","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":"b17f780a194b5a736d3d1afb1939997ff65b67b4","bugs":{"url":"https://github.com/jamiebuilds/tickedoff/issues"},"homepage":"https://github.com/jamiebuilds/tickedoff#readme","_id":"tickedoff@1.0.0","_npmVersion":"5.6.0","_nodeVersion":"8.9.4","_npmUser":{"name":"thejameskyle","email":"me@thejameskyle.com"},"dist":{"integrity":"sha512-7Q0NDg77Np0IwVw0fnPfcgcUvlF6eoNtvRB5Ui0Uc1JWx4jiHdj2Lm45UrkcvPUslldvJCV8uAiJSjZVDjP/gA==","shasum":"2683846e03bbb1c158ce2b4e7e85b8a6d23aed94","tarball":"http://registry-npm.ywwl.com/tickedoff/download/tickedoff-1.0.0.tgz","fileCount":4,"unpackedSize":2786,"signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEQCIAR70keghEu2GYMvsERRyA/LlS5YHBdJk2IZl+u8zRZjAiAOUwmrOK9LhnwQ05QMas//KUoiy5EGH3iP9dID7Ys9WA=="}],"size":1684,"noattachment":false,"key":"/tickedoff/-/tickedoff-1.0.0.tgz"},"maintainers":[{"name":"thejameskyle","email":"me@thejameskyle.com"}],"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/tickedoff_1.0.0_1522086848419_0.8326573878259684"},"_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":1522086848473,"_cnpm_publish_time":1522086848473,"dist-tags":{"latest":"1.0.2"}}