| 1 |
{ |
| 2 |
"_id": "p-try", |
| 3 |
"_rev": "4-0ba2e91d165daeece851d18733763af5", |
| 4 |
"name": "p-try", |
| 5 |
"description": "`Start a promise chain", |
| 6 |
"dist-tags": { |
| 7 |
"latest": "2.2.0" |
| 8 |
}, |
| 9 |
"versions": { |
| 10 |
"1.0.0": { |
| 11 |
"name": "p-try", |
| 12 |
"version": "1.0.0", |
| 13 |
"description": "`Promise#try()` ponyfill - Starts a promise chain", |
| 14 |
"license": "MIT", |
| 15 |
"repository": { |
| 16 |
"type": "git", |
| 17 |
"url": "git+https://github.com/sindresorhus/p-try.git" |
| 18 |
}, |
| 19 |
"author": { |
| 20 |
"name": "Sindre Sorhus", |
| 21 |
"email": "[email protected]", |
| 22 |
"url": "sindresorhus.com" |
| 23 |
}, |
| 24 |
"engines": { |
| 25 |
"node": ">=4" |
| 26 |
}, |
| 27 |
"scripts": { |
| 28 |
"test": "xo && ava" |
| 29 |
}, |
| 30 |
"files": [ |
| 31 |
"index.js" |
| 32 |
], |
| 33 |
"keywords": [ |
| 34 |
"promise", |
| 35 |
"try", |
| 36 |
"resolve", |
| 37 |
"function", |
| 38 |
"catch", |
| 39 |
"async", |
| 40 |
"await", |
| 41 |
"promises", |
| 42 |
"settled", |
| 43 |
"ponyfill", |
| 44 |
"polyfill", |
| 45 |
"shim", |
| 46 |
"bluebird" |
| 47 |
], |
| 48 |
"devDependencies": { |
| 49 |
"ava": "*", |
| 50 |
"xo": "*" |
| 51 |
}, |
| 52 |
"xo": { |
| 53 |
"esnext": true |
| 54 |
}, |
| 55 |
"gitHead": "8a6f2c232b80e12c138714e553fc8dd6313604c2", |
| 56 |
"bugs": { |
| 57 |
"url": "https://github.com/sindresorhus/p-try/issues" |
| 58 |
}, |
| 59 |
"homepage": "https://github.com/sindresorhus/p-try#readme", |
| 60 |
"_id": "[email protected]", |
| 61 |
"_shasum": "cbc79cdbaf8fd4228e13f621f2b1a237c1b207b3", |
| 62 |
"_from": ".", |
| 63 |
"_npmVersion": "2.15.9", |
| 64 |
"_nodeVersion": "4.6.0", |
| 65 |
"_npmUser": { |
| 66 |
"name": "sindresorhus", |
| 67 |
"email": "[email protected]" |
| 68 |
}, |
| 69 |
"dist": { |
| 70 |
"shasum": "cbc79cdbaf8fd4228e13f621f2b1a237c1b207b3", |
| 71 |
"tarball": "https://registry.npmjs.org/p-try/-/p-try-1.0.0.tgz" |
| 72 |
}, |
| 73 |
"maintainers": [ |
| 74 |
{ |
| 75 |
"name": "sindresorhus", |
| 76 |
"email": "[email protected]" |
| 77 |
} |
| 78 |
], |
| 79 |
"_npmOperationalInternal": { |
| 80 |
"host": "packages-12-west.internal.npmjs.com", |
| 81 |
"tmp": "tmp/p-try-1.0.0.tgz_1477030603238_0.5670752932783216" |
| 82 |
}, |
| 83 |
"directories": {} |
| 84 |
}, |
| 85 |
"2.0.0": { |
| 86 |
"name": "p-try", |
| 87 |
"version": "2.0.0", |
| 88 |
"description": "`Start a promise chain", |
| 89 |
"license": "MIT", |
| 90 |
"repository": { |
| 91 |
"type": "git", |
| 92 |
"url": "git+https://github.com/sindresorhus/p-try.git" |
| 93 |
}, |
| 94 |
"author": { |
| 95 |
"name": "Sindre Sorhus", |
| 96 |
"email": "[email protected]", |
| 97 |
"url": "sindresorhus.com" |
| 98 |
}, |
| 99 |
"engines": { |
| 100 |
"node": ">=6" |
| 101 |
}, |
| 102 |
"scripts": { |
| 103 |
"test": "xo && ava" |
| 104 |
}, |
| 105 |
"files": [ |
| 106 |
"index.js" |
| 107 |
], |
| 108 |
"keywords": [ |
| 109 |
"promise", |
| 110 |
"try", |
| 111 |
"resolve", |
| 112 |
"function", |
| 113 |
"catch", |
| 114 |
"async", |
| 115 |
"await", |
| 116 |
"promises", |
| 117 |
"settled", |
| 118 |
"ponyfill", |
| 119 |
"polyfill", |
| 120 |
"shim", |
| 121 |
"bluebird" |
| 122 |
], |
| 123 |
"devDependencies": { |
| 124 |
"ava": "*", |
| 125 |
"xo": "*" |
| 126 |
}, |
| 127 |
"gitHead": "bba0e1dd227a64c91d16840e0985be9603c3ab62", |
| 128 |
"bugs": { |
| 129 |
"url": "https://github.com/sindresorhus/p-try/issues" |
| 130 |
}, |
| 131 |
"homepage": "https://github.com/sindresorhus/p-try#readme", |
| 132 |
"_id": "[email protected]", |
| 133 |
"_npmVersion": "5.6.0", |
| 134 |
"_nodeVersion": "8.11.2", |
| 135 |
"_npmUser": { |
| 136 |
"name": "sindresorhus", |
| 137 |
"email": "[email protected]" |
| 138 |
}, |
| 139 |
"dist": { |
| 140 |
"integrity": "sha512-hMp0onDKIajHfIkdRk3P4CdCmErkYAxxDtP3Wx/4nZ3aGlau2VKh3mZpcuFkH27WQkL/3WBCPOktzA9ZOAnMQQ==", |
| 141 |
"shasum": "85080bb87c64688fa47996fe8f7dfbe8211760b1", |
| 142 |
"tarball": "https://registry.npmjs.org/p-try/-/p-try-2.0.0.tgz", |
| 143 |
"fileCount": 4, |
| 144 |
"unpackedSize": 2987, |
| 145 |
"npm-signature": "-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJbIqGkCRA9TVsSAnZWagAAMBoQAJN8/dFWjtMshgIsBTwp\nU5BksixW+WTd2gwX8gwnBfE0e3ZVDILdE60seM9FflibHNzFUD0qnfyvrvw2\nOr88f2WYA2PpnweQ5mC7ZSTl1m6FiXhgAnA4q2HX+QWhMkrYiUzodR0LjQ3P\nhIcPHQAjXvYMFDM4tD9HCR/GB5+nhR1phmKpXNLocjFG0/HOFNZf5LAX5kBj\nAYQZisPKISNoN0mtdgdZYhLssrxu9uxT5jyRRyf1awpo/FYlHrWWiyuKUeBq\nla0ke7ooJp4kXzfgU333gzO27nhRuU52G4wv5EVTt/2du03KcBLZvsuKRTHC\nPmC0frxa+nn+jl8cXQlVF8sRxhLElx9z8ou87AhFJoKAmwAF3I4he7cNo2l/\nSat5eEJwUZefFHDzQ8ki6bbzpmpEog07gnlSu3pZLKABLk4o8lCI5pZe/zyE\n0b6OiEAcYaB4nXpW7zmDhkP4qmhN9uSIxZdTt8OTnnhuJDV7JMnH70n/vfPs\n3gUObscw9NV5rbFVzmtMx/O+vDdTnAPCJ8nInCbC7GZjmheezLy545CXCWTZ\na6pJ/NXpufXsHvGoC8IvqAFvQ3cPiKThiGSjR8DvuLkPKM99uf7jMGUT2kBC\n4VUot0pEyWKcmvpfcrdmPGG0VM6Arbu9DkyelxPatk4H4uIN+fwHwwHrZopw\nm9tq\r\n=aQEU\r\n-----END PGP SIGNATURE-----\r\n" |
| 146 |
}, |
| 147 |
"maintainers": [ |
| 148 |
{ |
| 149 |
"name": "sindresorhus", |
| 150 |
"email": "[email protected]" |
| 151 |
} |
| 152 |
], |
| 153 |
"directories": {}, |
| 154 |
"_npmOperationalInternal": { |
| 155 |
"host": "s3://npm-registry-packages", |
| 156 |
"tmp": "tmp/p-try_2.0.0_1528996259608_0.5084892289403542" |
| 157 |
}, |
| 158 |
"_hasShrinkwrap": false |
| 159 |
}, |
| 160 |
"2.1.0": { |
| 161 |
"name": "p-try", |
| 162 |
"version": "2.1.0", |
| 163 |
"description": "`Start a promise chain", |
| 164 |
"license": "MIT", |
| 165 |
"repository": { |
| 166 |
"type": "git", |
| 167 |
"url": "git+https://github.com/sindresorhus/p-try.git" |
| 168 |
}, |
| 169 |
"author": { |
| 170 |
"name": "Sindre Sorhus", |
| 171 |
"email": "[email protected]", |
| 172 |
"url": "sindresorhus.com" |
| 173 |
}, |
| 174 |
"engines": { |
| 175 |
"node": ">=6" |
| 176 |
}, |
| 177 |
"scripts": { |
| 178 |
"test": "xo && ava && tsd-check" |
| 179 |
}, |
| 180 |
"keywords": [ |
| 181 |
"promise", |
| 182 |
"try", |
| 183 |
"resolve", |
| 184 |
"function", |
| 185 |
"catch", |
| 186 |
"async", |
| 187 |
"await", |
| 188 |
"promises", |
| 189 |
"settled", |
| 190 |
"ponyfill", |
| 191 |
"polyfill", |
| 192 |
"shim", |
| 193 |
"bluebird" |
| 194 |
], |
| 195 |
"devDependencies": { |
| 196 |
"ava": "^1.3.1", |
| 197 |
"tsd-check": "^0.5.0", |
| 198 |
"xo": "^0.24.0" |
| 199 |
}, |
| 200 |
"gitHead": "49fe9f6558307544a992f314132711b71445b901", |
| 201 |
"bugs": { |
| 202 |
"url": "https://github.com/sindresorhus/p-try/issues" |
| 203 |
}, |
| 204 |
"homepage": "https://github.com/sindresorhus/p-try#readme", |
| 205 |
"_id": "[email protected]", |
| 206 |
"_npmVersion": "6.4.1", |
| 207 |
"_nodeVersion": "10.15.1", |
| 208 |
"_npmUser": { |
| 209 |
"name": "sindresorhus", |
| 210 |
"email": "[email protected]" |
| 211 |
}, |
| 212 |
"dist": { |
| 213 |
"integrity": "sha512-H2RyIJ7+A3rjkwKC2l5GGtU4H1vkxKCAGsWasNVd0Set+6i4znxbWy6/j16YDPJDWxhsgZiKAstMEP8wCdSpjA==", |
| 214 |
"shasum": "c1a0f1030e97de018bb2c718929d2af59463e505", |
| 215 |
"tarball": "https://registry.npmjs.org/p-try/-/p-try-2.1.0.tgz", |
| 216 |
"fileCount": 5, |
| 217 |
"unpackedSize": 3960, |
| 218 |
"npm-signature": "-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJcj9XHCRA9TVsSAnZWagAAa2YP/iCbddLF716pKFOY66nS\nI2i83YaSc4f3C4kglcgT0X93EAHrLFBwmB1Ncy7kNZWJ7k/9SpD+Z8wa598M\nuCQgt0aIn/i9s75dhm/u+0n29ieRBZVf7r+S+HpAnLsIMeNbSJHXJz5F0oAj\nPD8q/S4uljVVo2gI51lv3RVKhtR+/662bZfweYCiLyzGh3rzeOX5U6dT95OR\nNQZ1XfuLwDgo4XHS5IgwMvbCi4ZVKCCiUux8xoelQ2KsP6OgL3ufKH3QXcYN\nvkVVmWwUCC8RE9cPlV0GsaHwlHFA1zyQeyKHbFzuconAAJmRLZLl3CDa6BDj\nce6cFnr/LY3W9LWsfn8eDpiksR+KPtkCZoVom9bjYiuIHNKOivAZIeasHW4E\nfSMuT6wU8Xq8TKfpDVGt00NrO2Uemdpw9B506t6Piid7lzhacrszSKmbDyeD\neEj/6yl5DPrTCybT6s5gVIzq5cJSK98bZhnAhAdN0YwqIOjdQ5AASio1lOuy\nAK2KmAzlkepoiwth4yHeWO3YR+N2EbQFgZS0Y0hBudYXyR7lS/QocA+ka5xX\nwBO2wr4a95LxREkJJw02Izk0Dg7ifRd15nLsA8XbjxmUJv5UAUIKKew3sYXp\n08tRORjrpiXc3heDyeWg6HlQ18I665fBrY1VDwp1DG93hAiFTwGC0Dn3OVzy\nb+Z4\r\n=aVpq\r\n-----END PGP SIGNATURE-----\r\n" |
| 219 |
}, |
| 220 |
"maintainers": [ |
| 221 |
{ |
| 222 |
"name": "sindresorhus", |
| 223 |
"email": "[email protected]" |
| 224 |
} |
| 225 |
], |
| 226 |
"directories": {}, |
| 227 |
"_npmOperationalInternal": { |
| 228 |
"host": "s3://npm-registry-packages", |
| 229 |
"tmp": "tmp/p-try_2.1.0_1552930246946_0.0368995873413136" |
| 230 |
}, |
| 231 |
"_hasShrinkwrap": false |
| 232 |
}, |
| 233 |
"2.2.0": { |
| 234 |
"name": "p-try", |
| 235 |
"version": "2.2.0", |
| 236 |
"description": "`Start a promise chain", |
| 237 |
"license": "MIT", |
| 238 |
"repository": { |
| 239 |
"type": "git", |
| 240 |
"url": "git+https://github.com/sindresorhus/p-try.git" |
| 241 |
}, |
| 242 |
"author": { |
| 243 |
"name": "Sindre Sorhus", |
| 244 |
"email": "[email protected]", |
| 245 |
"url": "sindresorhus.com" |
| 246 |
}, |
| 247 |
"engines": { |
| 248 |
"node": ">=6" |
| 249 |
}, |
| 250 |
"scripts": { |
| 251 |
"test": "xo && ava && tsd" |
| 252 |
}, |
| 253 |
"keywords": [ |
| 254 |
"promise", |
| 255 |
"try", |
| 256 |
"resolve", |
| 257 |
"function", |
| 258 |
"catch", |
| 259 |
"async", |
| 260 |
"await", |
| 261 |
"promises", |
| 262 |
"settled", |
| 263 |
"ponyfill", |
| 264 |
"polyfill", |
| 265 |
"shim", |
| 266 |
"bluebird" |
| 267 |
], |
| 268 |
"devDependencies": { |
| 269 |
"ava": "^1.4.1", |
| 270 |
"tsd": "^0.7.1", |
| 271 |
"xo": "^0.24.0" |
| 272 |
}, |
| 273 |
"gitHead": "e80e2e130b2d16807345be02aa03541e6e085952", |
| 274 |
"bugs": { |
| 275 |
"url": "https://github.com/sindresorhus/p-try/issues" |
| 276 |
}, |
| 277 |
"homepage": "https://github.com/sindresorhus/p-try#readme", |
| 278 |
"_id": "[email protected]", |
| 279 |
"_nodeVersion": "8.15.0", |
| 280 |
"_npmVersion": "6.9.0", |
| 281 |
"_npmUser": { |
| 282 |
"name": "sindresorhus", |
| 283 |
"email": "[email protected]" |
| 284 |
}, |
| 285 |
"dist": { |
| 286 |
"integrity": "sha512-R4nPAVTAU0B9D35/Gk3uJf/7XYbQcyohSKdvAxIRSNghFl4e71hVoGnBNQz9cWaXxO2I10KTC+3jMdvvoKw6dQ==", |
| 287 |
"shasum": "cb2868540e313d61de58fafbe35ce9004d5540e6", |
| 288 |
"tarball": "https://registry.npmjs.org/p-try/-/p-try-2.2.0.tgz", |
| 289 |
"fileCount": 5, |
| 290 |
"unpackedSize": 4371, |
| 291 |
"npm-signature": "-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJcoLPbCRA9TVsSAnZWagAALrsP/ie/GNjXnqYiGeGV/bKQ\nudud/fo7L0Brvq7zY+bNfSDNeyIDc5fosGrrCvaCA7JpK+KYnN+ww6lTy2pa\nY3njArVn6eeqfw2ZnheHrJOduMvftXw3+9EJ2Y0ulJ+OfDxvFI5n3HsE4bia\n4M/hMfvo4ScI4MmDnkcGA0rZEEPnfHg8Ud9u5tJOyIsftV08oY4Czg+cGyOV\nWuLge0A7+BHXhmVz44NR7edufsq2hbbmSsvl14SMyWYEjKV2r9Q3fEwL5XHP\narq39bqA9X+DnD0a12oWtYeT+v3r5ewg4h7H7QtA9Bvxdns/usJw/6KHy1za\nh8haNrRmBn1ze0sF/kNSKeStFcIsH8fp4Iiu4w8mniipVcuSt5tK5mvh3KOv\n0p8rBWzxGEqcxXxsxmI1rLEKGMy0ZthgvLOtRsnYl8a/DG1cxE9ZN5c2oaWA\ngUSDavh3tnwpl8PTag013nAmYSDYTNhA2TmHbWbfTzSCFvAjhivKfbIrcyF6\n1iQX4AckEZgtSTvbzbggC87gQS4xMfM82pi2rmkJuv3i6Iu2RkbDeFrQWphl\nL0FftZLanQQ39WeOiHZK1zNiBLaOxXWH/VWQKLG9CwgYSqFNGDbZIQuq2HkI\n/lJ6uIP2LZs+dMpDlw37K4BUOIS7wxJvOGfbwZmyYHN6gA2AeCA2wYZh4zVc\npEVP\r\n=gHtm\r\n-----END PGP SIGNATURE-----\r\n" |
| 292 |
}, |
| 293 |
"maintainers": [ |
| 294 |
{ |
| 295 |
"name": "sindresorhus", |
| 296 |
"email": "[email protected]" |
| 297 |
} |
| 298 |
], |
| 299 |
"directories": {}, |
| 300 |
"_npmOperationalInternal": { |
| 301 |
"host": "s3://npm-registry-packages", |
| 302 |
"tmp": "tmp/p-try_2.2.0_1554035674934_0.5387262637396022" |
| 303 |
}, |
| 304 |
"_hasShrinkwrap": false |
| 305 |
} |
| 306 |
}, |
| 307 |
"readme": "# p-try [](https://travis-ci.org/sindresorhus/p-try)\n\n> Start a promise chain\n\n[How is it useful?](http://cryto.net/~joepie91/blog/2016/05/11/what-is-promise-try-and-why-does-it-matter/)\n\n\n## Install\n\n```\n$ npm install p-try\n```\n\n\n## Usage\n\n```js\nconst pTry = require('p-try');\n\n(async () => {\n\ttry {\n\t\tconst value = await pTry(() => {\n\t\t\treturn synchronousFunctionThatMightThrow();\n\t\t});\n\t\tconsole.log(value);\n\t} catch (error) {\n\t\tconsole.error(error);\n\t}\n})();\n```\n\n\n## API\n\n### pTry(fn, ...arguments)\n\nReturns a `Promise` resolved with the value of calling `fn(...arguments)`. If the function throws an error, the returned `Promise` will be rejected with that error.\n\nSupport for passing arguments on to the `fn` is provided in order to be able to avoid creating unnecessary closures. You probably don't need this optimization unless you're pushing a *lot* of functions.\n\n#### fn\n\nThe function to run to start the promise chain.\n\n#### arguments\n\nArguments to pass to `fn`.\n\n\n## Related\n\n- [p-finally](https://github.com/sindresorhus/p-finally) - `Promise#finally()` ponyfill - Invoked when the promise is settled regardless of outcome\n- [More…](https://github.com/sindresorhus/promise-fun)\n\n\n## License\n\nMIT © [Sindre Sorhus](https://sindresorhus.com)\n", |
| 308 |
"maintainers": [ |
| 309 |
{ |
| 310 |
"name": "sindresorhus", |
| 311 |
"email": "[email protected]" |
| 312 |
} |
| 313 |
], |
| 314 |
"time": { |
| 315 |
"modified": "2019-03-31T12:34:37.909Z", |
| 316 |
"created": "2016-10-21T06:16:43.459Z", |
| 317 |
"1.0.0": "2016-10-21T06:16:43.459Z", |
| 318 |
"2.0.0": "2018-06-14T17:10:59.660Z", |
| 319 |
"2.1.0": "2019-03-18T17:30:47.159Z", |
| 320 |
"2.2.0": "2019-03-31T12:34:35.198Z" |
| 321 |
}, |
| 322 |
"homepage": "https://github.com/sindresorhus/p-try#readme", |
| 323 |
"keywords": [ |
| 324 |
"promise", |
| 325 |
"try", |
| 326 |
"resolve", |
| 327 |
"function", |
| 328 |
"catch", |
| 329 |
"async", |
| 330 |
"await", |
| 331 |
"promises", |
| 332 |
"settled", |
| 333 |
"ponyfill", |
| 334 |
"polyfill", |
| 335 |
"shim", |
| 336 |
"bluebird" |
| 337 |
], |
| 338 |
"repository": { |
| 339 |
"type": "git", |
| 340 |
"url": "git+https://github.com/sindresorhus/p-try.git" |
| 341 |
}, |
| 342 |
"author": { |
| 343 |
"name": "Sindre Sorhus", |
| 344 |
"email": "[email protected]", |
| 345 |
"url": "sindresorhus.com" |
| 346 |
}, |
| 347 |
"bugs": { |
| 348 |
"url": "https://github.com/sindresorhus/p-try/issues" |
| 349 |
}, |
| 350 |
"license": "MIT", |
| 351 |
"readmeFilename": "readme.md" |
| 352 |
} |