{"name":"yoctodelay","version":"1.2.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":"https://sindresorhus.com"},"engines":{"node":">=4"},"scripts":{"test":"xo && ava && tsd"},"keywords":["promise","resolve","delay","defer","wait","stall","timeout","settimeout","event","loop","next","tick","delay","async","await","promises","bluebird"],"devDependencies":{"ava":"^2.4.0","in-range":"^1.0.0","time-span":"^2.0.0","tsd":"^0.14.0","xo":"^0.24.0"},"xo":{"rules":{"eol-last":0},"ignores":["index.js"]},"gitHead":"4ae31dde3a7431e377e3268e457687ea74bb0c40","bugs":{"url":"https://github.com/sindresorhus/yoctodelay/issues"},"homepage":"https://github.com/sindresorhus/yoctodelay#readme","_id":"yoctodelay@1.2.0","_nodeVersion":"14.15.1","_npmVersion":"6.14.10","_npmUser":{"name":"sindresorhus","email":"sindresorhus@gmail.com"},"dist":{"integrity":"sha512-12y/P9MSig9/5BEhBgylss+fkHiCRZCvYR81eH35NW9uw801cvJt31EAV+WOLcwZRZbLiIQl/hxcdXXXFmGvXg==","shasum":"0d020c8bcec22989369db31e5d352acc6a13eda8","tarball":"http://registry-npm.ywwl.com/yoctodelay/download/yoctodelay-1.2.0.tgz","fileCount":5,"unpackedSize":3524,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJgIOrpCRA9TVsSAnZWagAAtWAQAIt/9Gse4MrOAIj1QCsZ\nHnRc2VezLUfwU3GHNZrJf8CilGBOGw47iK5WcRTiJXC+ZB+Er+H0qAO5+2Jx\nhZvJdbFtSU6LC+HYVr51WeALqVTE+saYSXghQ5ScFGwo4DLTuBfiTKOVD1/Y\ninmjQuy4MEw34fa5UiG2XwUPa/+9Snslqb+6bSEGOn/Y1a5+xQvcszmRZvR+\ngDKMSG5UB/M3SSZUTEJcuttmfPw/ky07CeYBNxawZ3nJibvEF/jnpz5LdeIf\naepdvL+s+q0RcuZvWVzXhcpQNCZyExisDAJ3Q8S+RpdyIi87az3IwSKckrjt\nDYiG0ayan+W0wYk17oxohF/aj6jVEZi4i4Y119qUBElv1ByqrehVvElI9C9y\nfSstOt6Iff2Ji1cXWdtOjrPthS0jTpbdNEZ80ZQTnyAZc6Yc/1LrXN0ccHSU\nCV69w3SqiKSMVrI6NKpwoYLQYz1ULFu4O3QI7s4hMpHz97QTjUoPh1clYnia\nnm4aWGcuRPq6lGXcXQVlA+uVsHuMcleSK0jclgx2zLmkON++51Mg92lFlLd9\nJicjdj/lMpAryPtpUxy2Dy5uqSbm0IRtQbXUnGDbP3mZbZxnjZcD6uqepffU\nZfB5epgnFGFfMd8xy4nONOKHukktmQI+N5PFdHKYrH3G7zj4kgOce4FMyHbd\nHXaj\r\n=ezg5\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEQCIBpi5S7JpW28jqSUDNH3tfaxCDNuovzZt8f1CdXLuxxiAiAEwKswYyfRsFuJ9Jm6tVwz7dNL0JmjFM+tEPvyAH6CyA=="}],"size":1948,"noattachment":false,"key":"/yoctodelay/-/yoctodelay-1.2.0.tgz"},"directories":{},"maintainers":[{"name":"sindresorhus","email":"sindresorhus@gmail.com"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/yoctodelay_1.2.0_1612770025143_0.21498271718056494"},"_hasShrinkwrap":false,"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":1612770025307,"_cnpm_publish_time":1612770025307,"dist-tags":{"latest":"2.0.0"}}