{"_id":"p-after","_rev":"2-856891269b6ebf01aad3380095071e6a","name":"p-after","dist-tags":{"latest":"1.0.1"},"versions":{"1.0.1":{"name":"p-after","version":"1.0.1","description":"Resolve a promise after an amount of time with specified data","main":"index.js","scripts":{"test":"standard && ava"},"repository":{"type":"git","url":"git+https://github.com/Nicholaiii/p-after.git"},"keywords":["promise","after","delay","time","sequence"],"author":{"name":"Nicholai Nissen","email":"nicholainissen@gmail.com","url":"https://nicholai.dev"},"license":"MIT","bugs":{"url":"https://github.com/Nicholaiii/p-after/issues"},"homepage":"https://github.com/Nicholaiii/p-after#readme","devDependencies":{"ava":"^3.13.0","in-range":"^2.0.0","standard":"^14.3.4","time-span":"^4.0.0","np":"^6.5.0"},"engines":{"node":">=10"},"gitHead":"6d9eba9de14d81f2ce491020fbc7f44060a9a3bb","_id":"p-after@1.0.1","_nodeVersion":"14.7.0","_npmVersion":"6.14.8","dist":{"integrity":"sha512-rBq8APbZl6nqJClIZ3b0LuivrH2NGdVf8em7gmhN5a1ZXRmczSBAL57hcRw4N6kzhU4+GIcML7jL2KohGz/YKw==","shasum":"a3aa616b999d7d67a53e54c1c6b4bd613c67bdc2","tarball":"https://registry.npmjs.org/p-after/-/p-after-1.0.1.tgz","fileCount":5,"unpackedSize":3575,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJfkAZ+CRA9TVsSAnZWagAA1WgP/1FRqwL1imFn8Z4T+vPZ\npG9kShbrMWmLi/iOFQbQBilrrAMFpnlTpN2rhEs1QEStk6EYSyUPky/X7bd2\nT6NbBZaF21YinmsnWLphiekk3zvbUK9NtasIwoVLQ3AswwPQZyNRHU4wf1hc\nTWXUTaWKmyQA9+Vaq6ezY+bfJUZaLbm/trkO6M4uTJGuCHkiAQl3WmguL5LE\nfLNpq0nNujhBkOe5QkfXTp0l5E1oMVA+SonhmMaa5R3m2cmJZcvWZ+bR9k/6\n85XTQyCeVFXU1UC4FNYFGPLlZcSLKyO/jhJMbH3fM9CWdBrnGHeUx0lOr3Rk\nvZSBQEGNQcoPxEcZpFwhwIw+JKISwWTmB2FPVz7RFPhFyoxJonX6FKgclAJM\n9DIbIwUYtOVtTsxQXdiRdzN/6o/6JEaJw2vAay9N3gHN6a8mkW1wXZwtkeeC\nusN01JwpLe3J46GP+6SaIF260n2OkERxf1EMvmWHuCf6IjkhvkmFx7ZETyWw\nZEYY69O0hwys/8EBJsQkfugQjoQuWpqgOz2tQUNKH/1X3rBMBIn1k4f18dW1\nj7Vei9XAupPIoTHPu9PLSMlTW708F5ajosCqfZMH/mLsUWsyPnY4qe12bAn2\nGeuYd+ogt9Q7d72NHhze46FT/qQgzlXAp+fGnNgXkSOTdN60xQnpEJ6+duzI\n31dv\r\n=enoj\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEQCIDQbAEfAHZvOOO9luiPFjcLfrnr4RoeNLxaPKm1GkCFjAiAp/GaFupguSEn57KlvAcAIPCbHP3WlH1ocWlosCgTZlQ=="}]},"maintainers":[{"name":"nicholai","email":"nicholainissen@gmail.com"}],"_npmUser":{"name":"nicholai","email":"nicholainissen@gmail.com"},"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/p-after_1.0.1_1603274366439_0.08264393540613701"},"_hasShrinkwrap":false,"deprecated":"Use setTimeout from 'node:timers/promises', it is a drop-in replacement"}},"time":{"created":"2020-10-21T09:59:26.438Z","1.0.1":"2020-10-21T09:59:26.655Z","modified":"2024-04-06T05:58:42.844Z"},"maintainers":[{"name":"nicholai","email":"nicholainissen@gmail.com"}],"description":"Resolve a promise after an amount of time with specified data","homepage":"https://github.com/Nicholaiii/p-after#readme","keywords":["promise","after","delay","time","sequence"],"repository":{"type":"git","url":"git+https://github.com/Nicholaiii/p-after.git"},"author":{"name":"Nicholai Nissen","email":"nicholainissen@gmail.com","url":"https://nicholai.dev"},"bugs":{"url":"https://github.com/Nicholaiii/p-after/issues"},"license":"MIT","readme":"# p-after \r\n[![Build Status](https://travis-ci.com/Nicholaiii/p-after.svg?branch=main)](https://travis-ci.com/Nicholaiii/p-after)\r\n[![JavaScript Style Guide](https://img.shields.io/badge/code_style-standard-brightgreen.svg)](https://standardjs.com)\r\n\r\n> Resolve a promise with specified data after an amount of time\r\n\r\nUseful if you want to return data after some time, for example, if you want to sequence data at varying rates.\r\n\r\n## Usage\r\n```ts\r\nconst after = require('p-after')\r\n(async () => {\r\n  const result = await after(1000, 'OK')\r\n  // After one second, the promise resolves with 'OK'. \r\n})\r\n```\r\n\r\n## API\r\n\r\n### pAfter(when, what)\r\n\r\n#### when\r\nType: `number`\r\n\r\nThe amount of time to delay returning the data.\r\n\r\n#### what\r\nType: `any`\r\n\r\nThe data to return after delay.\r\n\r\n## Related\r\n- [delay](https://github.com/sindresorhus/delay) - Delay a promise a specified amount of time\r\n- [p-min-delay](https://github.com/sindresorhus/p-min-delay) - Delay an existing promise a minimum amount of time\r\n- [p-immediate](https://github.com/sindresorhus/p-immediate) - Returns a promise resolved in the next event loop - think `setImmediate()`\r\n- [p-timeout](https://github.com/sindresorhus/p-timeout) - Timeout a promise after a specified amount of time\r\n- [More…](https://github.com/sindresorhus/promise-fun)\r\n","readmeFilename":"README.md"}