{"_id":"time-limit-promise","_rev":"9-caccf794c60adddaf5eb4d8a9a472b7d","name":"time-limit-promise","description":"Fulfill long runinng promises on timeout.","dist-tags":{"latest":"1.0.4"},"versions":{"1.0.0":{"name":"time-limit-promise","version":"1.0.0","description":"Fulfill long runinng promises on timeout.","main":"./index.js","scripts":{"test":"mocha"},"repository":{"type":"git","url":"git+https://github.com/inikulin/time-limit-promise.git"},"keywords":["promise","timeout","time","timer","limit","resolve","reject"],"author":{"name":"Ivan Nikulin","url":"ifaaan@gmail.com, https://github.com/inikulin"},"license":"MIT","bugs":{"url":"https://github.com/inikulin/time-limit-promise/issues"},"homepage":"https://github.com/inikulin/time-limit-promise#readme","devDependencies":{"mocha":"^2.3.4","pinkie-promise":"^2.0.0"},"gitHead":"a6d4e1a7e282480d429052518466215da661f387","_id":"time-limit-promise@1.0.0","_shasum":"a86e0da54544ea8f42f1ce17b918a18bc70eb010","_from":".","_npmVersion":"2.14.7","_nodeVersion":"4.2.1","_npmUser":{"name":"inikulin","email":"ifaaan@gmail.com"},"maintainers":[{"name":"inikulin","email":"ifaaan@gmail.com"}],"dist":{"shasum":"a86e0da54544ea8f42f1ce17b918a18bc70eb010","tarball":"https://registry.npmjs.org/time-limit-promise/-/time-limit-promise-1.0.0.tgz","integrity":"sha512-nKtRubgpIF1hUzXLe657Q1cH8Tff+qFtHpanVy1UrWcIgScBUULLtVoTeFMBVD0CnQMF05MNJh4D8QWoBwUh6g==","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIHwcc+m13AOR1zf6PBl9bPgJvNMmYFqIDkgcyil9w0IOAiEAna0od0UagNYqVEOY4/B38Oun8bMQfY3iBQwnnBTyWR8="}]},"directories":{}},"1.0.1":{"name":"time-limit-promise","version":"1.0.1","description":"Fulfill long runinng promises on timeout.","main":"./index.js","scripts":{"test":"mocha"},"repository":{"type":"git","url":"git+https://github.com/inikulin/time-limit-promise.git"},"keywords":["promise","timeout","time","timer","limit","resolve","reject"],"author":{"name":"Ivan Nikulin","url":"ifaaan@gmail.com, https://github.com/inikulin"},"license":"MIT","bugs":{"url":"https://github.com/inikulin/time-limit-promise/issues"},"homepage":"https://github.com/inikulin/time-limit-promise#readme","files":["index.js"],"devDependencies":{"mocha":"^2.3.4","pinkie-promise":"^2.0.0"},"gitHead":"a6d4e1a7e282480d429052518466215da661f387","_id":"time-limit-promise@1.0.1","_shasum":"d69881cdd41362a024aa9119279fb35964ae3db3","_from":".","_npmVersion":"2.14.7","_nodeVersion":"4.2.1","_npmUser":{"name":"inikulin","email":"ifaaan@gmail.com"},"maintainers":[{"name":"inikulin","email":"ifaaan@gmail.com"}],"dist":{"shasum":"d69881cdd41362a024aa9119279fb35964ae3db3","tarball":"https://registry.npmjs.org/time-limit-promise/-/time-limit-promise-1.0.1.tgz","integrity":"sha512-WMexbwOo68iwtY21bNcBKxRuCJoL4J6HVRxukdkXDsRR2zGPZnowOiV/CDOJf8C6itkRVyfZO2q8QMNfv28Gnw==","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEQCIDXeH9WmYQfIteI0Jsn7qY27ddHZD7q3qd3mCboCR+u3AiBQRsyOMLLTeJ6guJ2bkRDEDd4uD5/qoRYx6UWvrzQkRg=="}]},"directories":{}},"1.0.2":{"name":"time-limit-promise","version":"1.0.2","description":"Fulfill long runinng promises on timeout.","main":"./index.js","scripts":{"test":"mocha"},"repository":{"type":"git","url":"git+https://github.com/inikulin/time-limit-promise.git"},"keywords":["promise","timeout","time","timer","limit","resolve","reject"],"author":{"name":"Ivan Nikulin","url":"ifaaan@gmail.com, https://github.com/inikulin"},"license":"MIT","bugs":{"url":"https://github.com/inikulin/time-limit-promise/issues"},"homepage":"https://github.com/inikulin/time-limit-promise#readme","files":["index.js"],"devDependencies":{"mocha":"^2.3.4","pinkie-promise":"^2.0.0"},"gitHead":"cd415431a1b8af4ae2fbd7001fff589b292ada9d","_id":"time-limit-promise@1.0.2","_shasum":"217fdc5c331f11d1b1eb0f828c95f7c29bae5ce4","_from":".","_npmVersion":"2.14.7","_nodeVersion":"4.2.1","_npmUser":{"name":"inikulin","email":"ifaaan@gmail.com"},"maintainers":[{"name":"inikulin","email":"ifaaan@gmail.com"}],"dist":{"shasum":"217fdc5c331f11d1b1eb0f828c95f7c29bae5ce4","tarball":"https://registry.npmjs.org/time-limit-promise/-/time-limit-promise-1.0.2.tgz","integrity":"sha512-DFE7RpqpQ1qwqbPDg+36gd+LaNypaV3ouPMKAis7dSQ9kXSGhwPmjTELz2EUot/EpChs85IGOJpOB5UPzVV0Kg==","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIQCPAUVOzv1b2WjJ19uOqt05YIKaj82uKTfrWpAV+SI7qQIgIpYRc5PTVUlZfTr9bldVfGl9r9GIBdZQa/caUTi7VdQ="}]},"directories":{}},"1.0.3":{"name":"time-limit-promise","version":"1.0.3","description":"Fulfill long runinng promises on timeout.","main":"./index.js","scripts":{"test":"mocha"},"repository":{"type":"git","url":"git+https://github.com/inikulin/time-limit-promise.git"},"keywords":["promise","timeout","time","timer","limit","resolve","reject"],"author":{"name":"Ivan Nikulin","url":"ifaaan@gmail.com, https://github.com/inikulin"},"license":"MIT","bugs":{"url":"https://github.com/inikulin/time-limit-promise/issues"},"homepage":"https://github.com/inikulin/time-limit-promise#readme","files":["index.js"],"engines":{"node":">= 0.12"},"devDependencies":{"mocha":"^2.3.4"},"gitHead":"08d0a671f8caa9a4117d44a4f55e39e1afbdfacf","_id":"time-limit-promise@1.0.3","_npmVersion":"6.0.1","_nodeVersion":"8.11.1","_npmUser":{"name":"inikulin","email":"ifaaan@gmail.com"},"dist":{"integrity":"sha512-+0FBZPycPPgHi938ZUWrUo109SoiNm9Q2phunDBaf6Hq3RgALLTkSH5s6kM58+81obl3fNLpBozwvPw+m5MM4A==","shasum":"a3cbfd01cc452b33d847c9b7736b81645bd5b45e","tarball":"https://registry.npmjs.org/time-limit-promise/-/time-limit-promise-1.0.3.tgz","fileCount":4,"unpackedSize":4174,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJbBa+bCRA9TVsSAnZWagAAC9gP/iEtlN0PetGPU9QlC+s0\nZiwMYFgKsrlC75av/b36DzV3n9dvnAyKEduRsamxkQ0I0El4xnMIxdscvZx1\nby7QxxPWZFK7livIcS/Si0ACt8D+YUCWQxpFHo5clXZ7OGxkBrMH03zpaDJz\nMAAP35y8MowIPx5TFaFs5l0QUogntsS7mFKOZ2KNopmOab4l4h//bX96him3\nKYQD/0r4n3qi3cEHIjwkuC5K/rpal86SBZ1y7tUI+kpszKIpHskfHH0XMskb\nGs8Ae0sGc5H5oPHpJLUH3ttTx3QV34w0BM75hq4TtT0sPSn18yDaNNkR/gTq\nxhfY+eh6FKlRT8tNwGjZ/WeB3eCjge5JyCGqKtJaNt58oISO+xvPQV09+xIo\nix5kOYORX6zhU+hQzc8quWAdnNwImqDnojsIEBnzVkQCytPo48c9k5hbZgYr\ntKRgB6VTkzgbkCc25GxXLTH5w1wZ8mchUuUFCO4S7s4D4VNP+IoJVJpcP64B\nUiZPRJ5IHvlBtDYg959gXqh1cFW0vzdzyclzV1n4vOFeVIOupFfEliUJpKeU\nBYbomn9791q4idAAgpK0VAl2U3ntDQMN/6A0n02LYM3OBhUzHj0/TSxNuUq3\nUjOqyj6aau8Wjzxp2udKHZnbap/ls2xYNW6omHLsNLF5tHTaeIllhVIVAm8w\nEfvg\r\n=H3z6\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIQCmRiN4GMegrdOT9LovriFcDOG5iGMYPXxoXSMbUGyyJwIgKM+4heZxDRG2PaO4PH+TzJ4o5KKhoQD4lfFD8wTlKV0="}]},"maintainers":[{"name":"inikulin","email":"ifaaan@gmail.com"}],"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/time-limit-promise_1.0.3_1527099290552_0.0711592553330398"},"_hasShrinkwrap":false},"1.0.4":{"name":"time-limit-promise","version":"1.0.4","description":"Fulfill long runinng promises on timeout.","main":"./index.js","scripts":{"test":"mocha"},"repository":{"type":"git","url":"git+https://github.com/inikulin/time-limit-promise.git"},"keywords":["promise","timeout","time","timer","limit","resolve","reject"],"author":{"name":"Ivan Nikulin","url":"ifaaan@gmail.com, https://github.com/inikulin"},"license":"MIT","bugs":{"url":"https://github.com/inikulin/time-limit-promise/issues"},"homepage":"https://github.com/inikulin/time-limit-promise#readme","files":["index.js"],"engines":{"node":">= 0.12"},"devDependencies":{"mocha":"^2.3.4"},"gitHead":"4a00961ea115e8f9f6682b201914358e455afbf6","_id":"time-limit-promise@1.0.4","_npmVersion":"6.0.1","_nodeVersion":"8.11.1","_npmUser":{"name":"inikulin","email":"ifaaan@gmail.com"},"dist":{"integrity":"sha512-FLHDDsIDducw7MBcRWlFtW2Tm50DoKOSFf0Nzx17qwXj8REXCte0eUkHrJl9QU3Bl9arG3XNYX0PcHpZ9xyuLw==","shasum":"33e928212273c70d52153c28ad2a7e3319b975f9","tarball":"https://registry.npmjs.org/time-limit-promise/-/time-limit-promise-1.0.4.tgz","fileCount":4,"unpackedSize":4358,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJbK4AzCRA9TVsSAnZWagAAw+4P/1jTHzl9NmWMQQ3MrC4s\nOtLgKE9ImQJRFbuXRMcU8+jRxYKuJCJeBZzPifckfe8gSURVce12ZHYpK7hE\nrpEnbLn/Km/umubHtFYFGsIYX35iIe0gw+2kA1nIPben8y6p9lE1Xk16DBdX\nTg8AAqOootRIKIK7X0QU3NOI+QRg1oVt0LcVKr5kKuLOwMS+GpFJv2slNEzr\nPkhq8u9NiYbgYgenKffsDXwnrYmtGzuh/4wK3XgQ2l2IrUaSvivprDz+EXH4\nW2kugdH/H2fJLNltyFasRPiKpqbrC6Ic9ULnjKE0VONQlxbsqkZ4QbK6rtKv\nJTGCbA6dDTxHDWWtD9HvpYJ8IjWVgz+RfD1L0fYyD0vOIqBz9PvYpNFfkZ46\neqZM6WzMC4kbFdmra8ZUjg73Cymdww7A24gs9elz25Dc628prwbXqFE9Ak4P\n6XXp2+9n7fCOn10QHzyGi2hO/UUCxUcSB/w2U9fs2PlWyp7B2FNvWopOmJJi\nthEvBt8NfJ94EbAsyvmX6nab4tlehIAYqDSjsDIsSQ81jBK8ZwpktpK3RMz8\nFuS6N+ejc37MAljc8W1YVJ+DwMs55L2uQmQ7od/wG1RywaKiVp4a6YrcFpMy\nD+Hezopdt1fqnKrTt809rpE8q/r0Kee0BC+DV2y6qlaxkH/zNJlp+pjkP3/S\nND+S\r\n=u4/R\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIGB2yr9bahuO4q15soJI7Ry6tlT+6KbS3YwDZ1FnZvkoAiEAubR0s1/9Dujal5OGY+vXzYf2dp07mzI/2StXgrdzxj8="}]},"maintainers":[{"name":"inikulin","email":"ifaaan@gmail.com"}],"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/time-limit-promise_1.0.4_1529577522324_0.77899079760619"},"_hasShrinkwrap":false}},"readme":"# time-limit-promise\n[![Build Status](https://api.travis-ci.org/inikulin/time-limit-promise.svg)](https://travis-ci.org/inikulin/time-limit-promise)\n\n*Fulfill long runinng promises on timeout.*\n\nUnlike other implementations on npm it has some nice extra features:\n - You can both reject and resolve promises on timeout\n - You can provide custom value with which promise will be rejected or resolved on timeout\n - Unrefs promise timer, so it will not block your app from exit.\n - Uses `Promise` implementation of the passed promise: no external implementation dependencies, no global `Promise` dependencies\n\n## Install\n```\nnpm install time-limit-promise\n```\n\n## Usage\n```js\nconst timeLimit = require('time-limit-promise');\nconst fetch     = require('node-fetch');\n\nvar fetchPromise = fetch('https://github.com/inikulin');\n\ntimeLimit(fetchPromise, 50).then(res => {\n    // If `fetchPromise` will be fulfilled within 50ms\n    // time limited promise will be fullfilled as well.\n    // Otherwise, it will be resolved with the `undefined` value.\n});\n\ntimeLimit(fetchPromise, 50, { resolveWith: 'no content' }).then(res => {\n    // Same as above, but on timeout it will\n    // be resolved with the `no-content` value.\n    console.log(res); // > no-content\n});\n\n\ntimeLimit(fetchPromise, 50, { rejectWith: new Error('timeout') }).catch(err => {\n    // Same as above, but on timeout it will\n    // be rejected with the provided error.\n    console.log(err.message); // > timeout\n});\n\n```\n\n## Author\n[Ivan Nikulin](https://github.com/inikulin) (ifaaan@gmail.com)\n","maintainers":[{"name":"inikulin","email":"ifaaan@gmail.com"}],"time":{"modified":"2022-06-27T06:43:58.961Z","created":"2015-12-03T19:00:22.330Z","1.0.0":"2015-12-03T19:00:22.330Z","1.0.1":"2015-12-03T19:00:54.473Z","1.0.2":"2015-12-03T19:03:26.000Z","1.0.3":"2018-05-23T18:14:50.663Z","1.0.4":"2018-06-21T10:38:42.399Z"},"homepage":"https://github.com/inikulin/time-limit-promise#readme","keywords":["promise","timeout","time","timer","limit","resolve","reject"],"repository":{"type":"git","url":"git+https://github.com/inikulin/time-limit-promise.git"},"author":{"name":"Ivan Nikulin","url":"ifaaan@gmail.com, https://github.com/inikulin"},"bugs":{"url":"https://github.com/inikulin/time-limit-promise/issues"},"license":"MIT","readmeFilename":"README.md","users":{"cliff":true}}