{"name":"yoctodelay","version":"1.0.0","description":"Delay a promise a specified amount of time","license":"MIT","repository":{"type":"git","url":"git+https://github.com/sindresorhus/yoctodelay.git"},"author":{"name":"Sindre Sorhus","email":"sindresorhus@gmail.com","url":"sindresorhus.com"},"engines":{"node":">=4"},"scripts":{"test":"xo && ava"},"files":["index.js"],"keywords":["promise","resolve","delay","defer","wait","stall","timeout","settimeout","event","loop","next","tick","delay","async","await","promises","bluebird"],"devDependencies":{"ava":"*","in-range":"^1.0.0","time-span":"^2.0.0","xo":"*"},"xo":{"ignores":["index.js"]},"gitHead":"f640eeb5f440131bb249eea8bf34f6f3d1fd76b8","bugs":{"url":"https://github.com/sindresorhus/yoctodelay/issues"},"homepage":"https://github.com/sindresorhus/yoctodelay#readme","_id":"yoctodelay@1.0.0","_npmVersion":"5.4.2","_nodeVersion":"8.7.0","_npmUser":{"name":"sindresorhus","email":"sindresorhus@gmail.com"},"dist":{"integrity":"sha512-2eRLNcHefPUw245P8THFQ6+rCndyG9MYu0eyu7SiA2QtwcV2iLZJgg+1wq7gzFCG+VPLO3Tndc+7Zo/hZdErYQ==","shasum":"332610846096a868a6adfe05171cfab3fa57815a","tarball":"http://registry-npm.ywwl.com/yoctodelay/download/yoctodelay-1.0.0.tgz","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEYCIQC7xcGuJofxigVybcmxio5KClctk1GMbNtJ4w6UFnw4QQIhAPfbwigXkq9OZ5YYUqNvIdv33FHFnQYl8IOV/ZsSwnZz"}],"size":1878,"noattachment":false,"key":"/yoctodelay/-/yoctodelay-1.0.0.tgz"},"maintainers":[{"name":"sindresorhus","email":"sindresorhus@gmail.com"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/yoctodelay-1.0.0.tgz_1508671482798_0.9338902852032334"},"directories":{},"readme":"# yoctodelay\n\n> Delay a promise a specified amount of time\n\nIt's less than half the size of the [`nanodelay`](https://github.com/ai/nanodelay) module.\n\n**Note:** If you target Node.js 16 or later, you can use the built-in functionality instead:\n\n```js\nimport {setTimeout as delay} from 'node:timers/promises';\n\nawait delay(100);\n```\n\n## Install\n\n```\n$ npm install yoctodelay\n```\n\n## Usage\n\n```js\nimport delay from 'yoctodelay';\n\nfoo();\n\nawait delay(100);\n\n// Executed 100 milliseconds later\nbar();\n```\n\n## API\n\n### delay(milliseconds)\n\nDelay the promise and then resolve.\n\n#### milliseconds\n\nType: `number`\n\nThe duration to delay the promise.\n\n## FAQ\n\n### What is yocto?\n\n[It's the smallest official unit prefix in the metric system.](https://en.wikipedia.org/wiki/Yocto-) Much smaller than nano.\n\n### Is this a joke?\n\nPartly. The `nanodelay` module was created only because the `delay` module is a tiny bit larger. Well, this module is a tiny bit smaller than the `nanodelay` module. Comparing size at the byte level is super silly. It doesn't matter unless the difference is more than many kilobytes. This is still a fully working module though. Go ahead and use it.\n\n## Related\n\n- [delay](https://github.com/sindresorhus/delay) - Similar to this module but with more features\n- [More…](https://github.com/sindresorhus/promise-fun)\n","publish_time":1508671482898,"_cnpm_publish_time":1508671482898,"dist-tags":{"latest":"2.0.0"}}