{"name":"promise-resolve-timeout","description":"Create a Promise which will resolve with the provided value after a timeout.","version":"1.2.1","main":"dist/index.js","types":"dist/index.d.ts","scripts":{"clean:dist":"rimraf dist","clean:coverage":"rimraf coverage .nyc_output","clean":"npm run clean:dist && npm run clean:coverage","compile":"tsc --skipLibCheck && tstei","compile:watch":"tsc --skipLibCheck --watch","test":"ava","test:watch":"ava --watch","coverage":"nyc --reporter=html ava","report":"nyc report","report:html":"open coverage/index.html","prepublishOnly":"npm run clean && npm run compile && npm run coverage"},"ava":{"files":["test/index.js"]},"bugs":{"url":"https://github.com/fabiospampinato/promise-resolve-timeout/issues"},"license":"MIT","author":{"name":"Fabio Spampinato","email":"spampinabio@gmail.com"},"repository":{"type":"git","url":"git+https://github.com/fabiospampinato/promise-resolve-timeout.git"},"keywords":["promise","resolve","timeout"],"dependencies":{},"devDependencies":{"@types/node":"^12.7.2","ava":"^2.3.0","ava-spec":"^1.1.1","nyc":"^14.1.1","rimraf":"^3.0.0","typescript":"^3.5.3","typescript-transform-export-interop":"^1.0.2"},"gitHead":"30acadfeae1894329211f0a5492df984643df0e5","homepage":"https://github.com/fabiospampinato/promise-resolve-timeout#readme","_id":"promise-resolve-timeout@1.2.1","_npmVersion":"6.4.1","_nodeVersion":"8.4.0","_npmUser":{"name":"fabiospampinato","email":"spampinabio@gmail.com"},"dist":{"integrity":"sha512-LX7nUgKWROZAnmevgL78OrFncV7aWf8J9t4GZ2dv6OM7fu1OF2cK0xEcROjrennfbpICHdriAa7TOUFkzGenwA==","shasum":"314847fea7e40e54fd093ff84236e47194eb7945","tarball":"http://registry-npm.ywwl.com/promise-resolve-timeout/download/promise-resolve-timeout-1.2.1.tgz","fileCount":13,"unpackedSize":7275,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJed46LCRA9TVsSAnZWagAAuRYQAKStq2QkG3l8LgkYSg0r\nmJwlidjOebLsbavHPL4pd1wfMti2Pgv0Xw3qrtw6ZewAnaLLiwKDTx8qc2sT\nEUerXQKmz+lhveu/BYaf/ghJY/db/58M6VZwBiV1kfzMMF9ktcmhc259Jt/n\nuAkcPuBKwhbKRkKj4HfNhHU3k/Ti9slTcmfx8vBNxvfAp870mIHkhZhcr+xt\nG4vDYdF46JI+N4tEbIpByUNCwLQL6G3JHxDsEDrGmde48y8gF/A+mjUw5+Zr\nAus0t/gz5/wU9R7DYJNJOKoNqi0bQPD5/RMA0WnsGaNXk0eiclRrOhpdx/x6\n8zZIkYVC/UsGRdHUicqVDUoFB3UhLEvdXIlVLYrRUxcpJK66CY6HE2GV+eu+\njDc/llMNULz9wRwfInAM4bg+7FuWnOPzyTo+mx1bp8PxFKzNmpyTg39oXTTj\nCi5d3nmG0fAdVd91EVrcSlcbB41g3xIqChaBgsMKm4d2r7uVRfNEkMQpWtqv\nJ0dT1y4p7hOgJpmzb5bVuFUWWmjCLGgoq5TO3Y8NlfDaa6qiI1bXDRrku5lQ\nJqunH52YNAoraubfze10Wsf4qM0hLp87mFMZOVCDc11IM+KcAs2k6owM9FjZ\niklx+f/YV6mVFj3d4lB4dzYVY89yAr1XY65FPPJCzsJ70aqKChSmrA4f1nl4\nuuF6\r\n=oj0w\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEYCIQCw+vxS6HkNh6EtI7KWnRzpwZ2KF+lIvp6PPq7h+WwcAAIhALWJm4JlTssL9LzrbsBlmllRqY3vSEVjR3G83or8Bkrw"}],"size":3203,"noattachment":false,"key":"/promise-resolve-timeout/-/promise-resolve-timeout-1.2.1.tgz"},"maintainers":[{"name":"fabiospampinato","email":"spampinabio@gmail.com"}],"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/promise-resolve-timeout_1.2.1_1584893579025_0.9544107117028566"},"_hasShrinkwrap":false,"readme":"# Promise Resolve Timeout\n\nCreate a Promise which will resolve with the provided value after a timeout.\n\n## Install\n\n```sh\nnpm install --save promise-resolve-timeout\n```\n\n## Usage\n\nIf the passed value is a function it will be called and its return value will be the resolved value, otherwise the passed value is the resolved value.\n\n```ts\nimport resolveTimeout from 'promise-resolve-timeout';\n\n// Defaulting to a default value when racing promises\n\nPromise.race ([\n  resolveTimeout ( 1000, false ), // Resolving after 1000ms\n  resolveTimeout ( 5000, () => 'foo' ), // Resolving after 5000ms\n  new Promise ( () => {\n    // Something...\n  });\n]);\n\n// Delaying\n\nresolveTimeout ( 1000 ) // Waiting 1000ms\n  .then ( () => {\n    // Something...\n  });\n```\n\n## License\n\nMIT © Fabio Spampinato\n","publish_time":1584893579185,"_cnpm_publish_time":1584893579185,"dist-tags":{"latest":"2.0.1"}}