{"name":"yoctodelay","version":"2.0.0","description":"Delay a promise a specified amount of time","license":"MIT","repository":{"type":"git","url":"git+https://github.com/sindresorhus/yoctodelay.git"},"funding":"https://github.com/sponsors/sindresorhus","author":{"name":"Sindre Sorhus","email":"sindresorhus@gmail.com","url":"https://sindresorhus.com"},"type":"module","exports":"./index.js","engines":{"node":"^12.20.0 || ^14.13.1 || >=16.0.0"},"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":"^3.15.0","in-range":"^3.0.0","time-span":"^5.0.0","tsd":"^0.17.0","xo":"^0.44.0"},"xo":{"rules":{"eol-last":"off"},"ignores":["index.js"]},"gitHead":"736bd0779546659b3c933542e43c31d1bfde53a2","bugs":{"url":"https://github.com/sindresorhus/yoctodelay/issues"},"homepage":"https://github.com/sindresorhus/yoctodelay#readme","_id":"yoctodelay@2.0.0","_nodeVersion":"12.22.1","_npmVersion":"7.10.0","dist":{"integrity":"sha512-0m1YaiUEnEPrZ7mKxkfRpPLfOjG1GeWd2E2IfB8toIUEhXjk5cW+czBDiQQkkMDycsuGDkG1dP40QQQoKJmEWw==","shasum":"764574818d7fd16c14b6cea7b5dbb52d6f22cdca","tarball":"http://registry-npm.ywwl.com/yoctodelay/download/yoctodelay-2.0.0.tgz","fileCount":5,"unpackedSize":3770,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJhGCnJCRA9TVsSAnZWagAAnk4P/j7pG4s/axTDINLEwwkT\nd3GYWWmCglfhQSYTDxTH3uNSpdQ6Yup0scE08F3yz6UULBx55rLHXD5G6GpR\n1ZCx9xjD5wtL+lhO8fE455xORFTMkeYnEExHMV/hfCZnAJsQ06us4gy6Ri7t\nW5RDG7dhpfeorO1NIMzXrVWwoEKFzrqqFbrohA7dSTkkBi2iAmey927Gyngb\nrSp1+co2uiZR6ZSwMmk/k2ASM4conYcMtFqUzs3WtJwtZY/+CQ1WdTmsd+zP\niAPyUueUX1zAz1tJJ2Yz9YSOI7l97Dj8koTPgCxfJNmOMjsA1irCj5li3F/1\nEbO5aZifa/H6jqyp/LXM8fQlXrC/89jlEIub3HMvaA680/NyiSOXjVcn+Alz\nWDSXmJs5vdct6C5XmMSud9Axzl2cEuQN7tg4SQ142Mj9pGZueCxp2IFY8iIR\nR94J6VEGpl51cngfZtVU+gA5eW7uinyc00yGa8J5QBGw6zCF/3oHPEYa6caL\n1nkeOYiHvu97DUhwBFc0ras0ViKXB8iAOj6K/cBNmB//itu2Kti8ZUhAkQ95\nB1ZO4NEDOMz3sa6Za8C4mB0gLMPFuujMAbSEYTph/QnqIR4l1/9/FLOaAG8r\n5ddADeuHjwxyHWB92XzXvfrfGvMaCy7qFc4kl1H+pLk9dcl5Cmgiu1Fs6wQX\nf2is\r\n=Ef9Z\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEQCIG6yaNuAt29Xz+xkGlVXuhb8hnJcr3qokqdX8HkNOeQkAiAD0on8KIpgAKfbJzVy25bJsNGm2NjJ22/Uo4pIYt41QA=="}],"size":2034,"noattachment":false,"key":"/yoctodelay/-/yoctodelay-2.0.0.tgz"},"_npmUser":{"name":"sindresorhus","email":"sindresorhus@gmail.com"},"directories":{},"maintainers":[{"name":"sindresorhus","email":"sindresorhus@gmail.com"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/yoctodelay_2.0.0_1628973513717_0.5061186759183529"},"_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":1628973513879,"_cnpm_publish_time":1628973513879,"dist-tags":{"latest":"2.0.0"}}