{"_id":"@acallaris/promise-js","_rev":"1-953f6de1cd2552949e061070359a7f15","name":"@acallaris/promise-js","dist-tags":{"latest":"1.0.0"},"versions":{"1.0.0":{"name":"@acallaris/promise-js","version":"1.0.0","description":"Handle promises like never before","main":"dist/index.js","type":"module","scripts":{"test":"npx mocha","build":"tsc"},"repository":{"type":"git","url":"git+https://github.com/acallaris/promise-js.git"},"keywords":["error","promise","handling","promise handling"],"author":{"name":"acallaris"},"license":"MIT","bugs":{"url":"https://github.com/acallaris/promise-js/issues"},"homepage":"https://github.com/acallaris/promise-js#readme","devDependencies":{"mocha":"^9.0.2"},"gitHead":"b25377c81c954ba5543ed271d29151c19d9518e8","_id":"@acallaris/promise-js@1.0.0","_nodeVersion":"16.5.0","_npmVersion":"7.20.0","dist":{"integrity":"sha512-yU1SeUNd46hbnSZoK8n+cPWPIJUi3HKzfaeVJAkQOWq5zu79G+At3j//y3iRKiOMaC65v8UrMpMBwlncPb/yyw==","shasum":"72022fce1f33e6b04e23839c4120e09ef58ecf72","tarball":"https://registry.npmjs.org/@acallaris/promise-js/-/promise-js-1.0.0.tgz","fileCount":5,"unpackedSize":3010,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJg+qi4CRA9TVsSAnZWagAALMcP+gJbyZNtuwEIFHt4LjHz\ni6sLTmUwHOgHnhXGQ2DFMcM/tA1AK00Zu6qbHAu+NGMKjv8//jgen5ov5WB9\nwGOzjlVBmEOA15+YUIG/RWn8IecVg2o8zYxXxH4lrz08f5SJSJW/SGPfhAO+\nqR00N51Cx6zg/McjoGyAIBt9mstTiW1YFJUIDNKbWJkwQiPixZ+HSLffACld\nsYR9UJCTciuKHPv+1uVn95kJ1/3vHdkgKhMJpG8/PpEgwxLWZFW3FeHCyvd0\nfQK8jEUC1P9Uu0gUisVhqB7t8tUKsYtPUt+qe7aOCnO+XZ7tu/WDPHstlP2E\nAO2zuDDKrFOcoWyaQnCvSyz4dqQmZCdWmx0ttVhZwHBve/h0UsjR4g0i70Hx\n+6vpb0gDd0bkO9BYc2Rl+3tkzB9l9z7Ycv5p6bsfu0mv45ZILnSmFuWtFJTV\nr3TAHV/ZEFUzH7ALM2gk+PZVdlKLuEesK6far7OsN97NHkl/J/uxu1vyQPUi\nWCnw2AfUKuEfF0ML7ZLGNQvpFOEs1rbVJI7pXvase+xOL3+KaRYftR9qrqHC\n77khyeOyBkZsvZU+l7+aSQmYPJOxRC7YlWxXOtACPkiw6KQR0mqX0B9jrUYc\nZfVcOgntNoBDdCEOpfwyoKBbDN6E+ljOjiQnGGxIsR+RvYpP4HkRnczSlilG\no7X4\r\n=7Mle\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEQCIG89h5i7vWhUfM+6gMcstgWNNlCkWNXPEQxi8jJu0ZciAiA6Fsq/EVcIS4mLjXCxC6MfG25dRxIx1maBg7SciMxPog=="}]},"_npmUser":{"name":"acallaris","email":"ramuda.acallaris@yahoo.com"},"directories":{},"maintainers":[{"name":"acallaris","email":"ramuda.acallaris@yahoo.com"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/promise-js_1.0.0_1627039928579_0.265286330959823"},"_hasShrinkwrap":false}},"time":{"created":"2021-07-23T11:32:08.530Z","1.0.0":"2021-07-23T11:32:08.755Z","modified":"2022-04-04T11:05:24.315Z"},"maintainers":[{"name":"acallaris","email":"ramuda.acallaris@yahoo.com"}],"description":"Handle promises like never before","homepage":"https://github.com/acallaris/promise-js#readme","keywords":["error","promise","handling","promise handling"],"repository":{"type":"git","url":"git+https://github.com/acallaris/promise-js.git"},"author":{"name":"acallaris"},"bugs":{"url":"https://github.com/acallaris/promise-js/issues"},"license":"MIT","readme":"# @acallaris/promise-js\r\nHandle promises like never before\r\n\r\n# Installation\r\n```sh\r\n$ npm install @acallaris/promise-js\r\n```\r\n\r\n# Usage\r\nYou must first `import` it to your project\r\n```js\r\nimport { handlePromise, handlePromiseArray } from '@acallaris/promise-js';\r\n\r\n// Or\r\nimport * as promise from '@acallaris/promise-js';\r\n```\r\nThen, you can use it like this.\r\n```js\r\n\r\n// Handle a single promise\r\nconst [data, error] = await handlePromise(yourAsyncFunction());\r\n\r\n// Handle an array of promises\r\nconst [data, error] = await handlePromiseArray([\r\n  yourAsyncFunction(),\r\n  anotherAsyncFunction(),\r\n  yetAnotherAsyncFunction()\r\n]);\r\n```","readmeFilename":"README.md"}