{"_id":"@articulate/asyncios","_rev":"178-9d03e59250a08e495a903d659c19fa46","name":"@articulate/asyncios","dist-tags":{"latest":"1.0.3"},"versions":{"1.0.0":{"name":"@articulate/asyncios","version":"1.0.0","author":{"name":"engineering@articulate.com"},"license":"MIT","_id":"@articulate/asyncios@1.0.0","maintainers":[{"name":"benmaz","email":"bmazarelli@articulate.com"},{"name":"botzo","email":"platform@articulate.com"},{"name":"bschemmel","email":"bschemmel@articulate.com"},{"name":"cdwills","email":"craig.d.wills@gmail.com"},{"name":"cfriedel","email":"cfriedel@articulate.com"},{"name":"darrenwhite","email":"darrenw@articulate.com"},{"name":"dbackes","email":"dbackes@articulate.com"},{"name":"dbertram","email":"dbertram@gmail.com"},{"name":"dietervds","email":"dietervds@gmail.com"},{"name":"esmitharticulate","email":"esmith@articulate.com"},{"name":"evil","email":"evilsoft@aol.com"},{"name":"flintinatux","email":"mccormack.scott@gmail.com"},{"name":"fromonesrc","email":"ocho@articulate.com"},{"name":"jamesadams11","email":"jameswadams11@gmail.com"},{"name":"jasminabasurita","email":"jasminejacquelin@gmail.com"},{"name":"jesspoemape","email":"jesspoemape@gmail.com"},{"name":"jrpz","email":"jperez@articulate.com"},{"name":"kdstew","email":"kstewart@articulate.com"},{"name":"matthewsecrist","email":"matthew@matthewsecrist.net"},{"name":"mcurran","email":"mcurran@articulate.com"},{"name":"mgreystone","email":"markus.greystone@gmail.com"},{"name":"mwinckler-articulate","email":"mwinckler@articulate.com"},{"name":"nicerhugs","email":"jscheuring@gmail.com"},{"name":"patrickeakin","email":"p.w.eakin@gmail.com"},{"name":"pklingem","email":"patrick.klingemann@gmail.com"},{"name":"racheldonovan","email":"rdonovan@articulate.com"},{"name":"rpearce","email":"me@robertwpearce.com"},{"name":"spencerfdavis","email":"spencerfdavis@gmail.com"},{"name":"spurr","email":"spurr@articulate.com"},{"name":"tchamblee","email":"tchamblee@articulate.com"},{"name":"tecnobrat","email":"brian@tecnobrat.com"},{"name":"tracycaruso","email":"tracy@articulate.com"},{"name":"tylerodonnell","email":"tyler@tylerodonnell.com"},{"name":"vamseek","email":"vamsee@articulate.com"},{"name":"vscerchia","email":"vscerchia@gmail.com"}],"contributors":[{"name":"Articulate Global, Inc.","email":"engineering@articulate.com"},{"name":"Markus Greystone","email":"mgreystone@articulate.com"},{"name":"Spencer Davis","email":"spencerfdavis@gmail.com"},{"name":"Scott McCormack"}],"dist":{"shasum":"a3c3f48b20905771f8e3ce301b72bcd1dc2552d9","tarball":"https://registry.npmjs.org/@articulate/asyncios/-/asyncios-1.0.0.tgz","fileCount":11,"integrity":"sha512-KA8hzEpV2yOzX4jrntorOVsj2lXxL/7gY0qvtBPqkmWx/EDWmbis5/+e0kOjANolOxLV8Hfd71DIFxq5xlfiog==","signatures":[{"sig":"MEUCIAVsXmv1AP9gOWgy35ecJN1gBXS7CNa5oGL/3FX1Uu8mAiEAhf6uNm6XIOYJsSBnZy+V1wqUhL8la9PSh1mpglDh9/I=","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":15516,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJdREw7CRA9TVsSAnZWagAAdV8P/iMuvaAlQCUjwmwKpR+z\naypHlRU/hwW6uMtxs40UgH4zcGJXS/4P7Mq1P0h5vvukBN7ZKZBqW+Luwbx2\nyZN8gfcACAKlj9tMbdz4wjKF2aw1ocgdGEr0sh06xHn3fnSV8UNsOwqUVHGX\nzgY9FbOuJCqq7GEQ6mCWoSSSaeVwJHmRmsLdC6C2jPhM70ZXyWAuEo+kHHPd\n0nU0J+hU3wigP5ORQwI+uwT4RDrVL/vgu5f4NBmSpKf1+4SSDc38WYejHCmA\nFzqpavBLvsgNixZpa386d4nzxcTg0b/zc9Xn2M0MLWHonEoJVDgc5Fz3LZIz\n3SxLyimfRJSUAoiof6nzNzshFYL1HxJmUv6h/DBD3qda2gMKIj3JIP9oTzSY\nGhgK5a2MbqNlTGKXyCwpsG7ohl1qYxLZ77vCF9bslP/VchXiyu32WzaEizEh\nHzs4CjYNZ4XgQL8qRLi+jIEmtzElxQEOYn9vF2sFXv/ZS90QDs6SkQQKqlhu\nna+XAaUhQQDZJSE2Ed9fdgmNQBbKFHUOTkpXmk72hzxwvHIGxohRmgSHWG7F\n7u0+YRVI8jvrzA158dt9971HCtOb6QNTC/WETpbBkcDv431P+z3U+J7fRmno\nO/rX4lO+NVwdeefH/xuWoCUJXc6ek0ysT+ltQr78ktMDnmBvJiDgDlJmaTH/\nozkp\r\n=znLn\r\n-----END PGP SIGNATURE-----\r\n"},"main":"index.js","private":false,"scripts":{"lint":"eslint .","test":"karma start --single-run","test:watch":"karma start"},"_npmUser":{"name":"mgreystone","email":"markus.greystone@gmail.com"},"repository":{"url":"git@github.com:articulate/asyncios.git","type":"git"},"description":"A wrapper for promise-based library Axios into a crocks Async","directories":{},"licenseText":"The MIT License (MIT)\n\nCopyright 2019 Articulate Global, Inc\n\nPermission is hereby granted, free of charge, to any person obtaining\na copy of this software and associated documentation files (the\n\"Software\"), to deal in the Software without restriction, including\nwithout limitation the rights to use, copy, modify, merge, publish,\ndistribute, sublicense, and/or sell copies of the Software, and to\npermit persons to whom the Software is furnished to do so, subject to\nthe following conditions:\n\nThe above copyright notice and this permission notice shall be\nincluded in all copies or substantial portions of the Software.\n\nTHE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND,\nEXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF\nMERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND\nNONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE\nLIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION\nOF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION\nWITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.\n","dependencies":{"crocks":"^0.12.3"},"_hasShrinkwrap":false,"devDependencies":{"chai":"^4.2.0","axios":"^0.16.2","jsdom":"^15.1.1","karma":"^4.2.0","mocha":"^6.2.0","sinon":"^7.3.2","eslint":"^6.0.1","watchify":"^3.11.1","browserify":"^16.3.0","karma-mocha":"^1.3.0","karma-browserify":"^6.1.0","eslint-plugin-node":"^9.1.0","eslint-plugin-import":"^2.18.1","karma-jsdom-launcher":"^7.1.1","eslint-plugin-promise":"^4.2.1","eslint-config-standard":"^13.0.1","eslint-plugin-standard":"^4.0.0"},"peerDependencies":{"axios":">=0.16.0"},"_npmOperationalInternal":{"tmp":"tmp/asyncios_1.0.0_1564757050504_0.19994478731116128","host":"s3://npm-registry-packages"},"deprecated":"Package no longer supported. Contact Support at https://www.npmjs.com/support for more info."},"1.0.1":{"name":"@articulate/asyncios","version":"1.0.1","author":{"name":"engineering@articulate.com"},"license":"MIT","_id":"@articulate/asyncios@1.0.1","maintainers":[{"name":"benmaz","email":"bmazarelli@articulate.com"},{"name":"botzo","email":"platform@articulate.com"},{"name":"bschemmel","email":"bschemmel@articulate.com"},{"name":"cdwills","email":"craig.d.wills@gmail.com"},{"name":"cfriedel","email":"cfriedel@articulate.com"},{"name":"darrenwhite","email":"darrenw@articulate.com"},{"name":"dbackes","email":"dbackes@articulate.com"},{"name":"dbertram","email":"dbertram@gmail.com"},{"name":"dietervds","email":"dietervds@gmail.com"},{"name":"esmitharticulate","email":"esmith@articulate.com"},{"name":"evil","email":"evilsoft@aol.com"},{"name":"flintinatux","email":"mccormack.scott@gmail.com"},{"name":"fromonesrc","email":"ocho@articulate.com"},{"name":"jamesadams11","email":"jameswadams11@gmail.com"},{"name":"jasminabasurita","email":"jasminejacquelin@gmail.com"},{"name":"jesspoemape","email":"jesspoemape@gmail.com"},{"name":"jrpz","email":"jperez@articulate.com"},{"name":"kdstew","email":"kstewart@articulate.com"},{"name":"matthewsecrist","email":"matthew@matthewsecrist.net"},{"name":"mcurran","email":"mcurran@articulate.com"},{"name":"mgreystone","email":"markus.greystone@gmail.com"},{"name":"mwinckler-articulate","email":"mwinckler@articulate.com"},{"name":"nicerhugs","email":"jscheuring@gmail.com"},{"name":"patrickeakin","email":"p.w.eakin@gmail.com"},{"name":"pklingem","email":"patrick.klingemann@gmail.com"},{"name":"racheldonovan","email":"rdonovan@articulate.com"},{"name":"rpearce","email":"me@robertwpearce.com"},{"name":"spencerfdavis","email":"spencerfdavis@gmail.com"},{"name":"spurr","email":"spurr@articulate.com"},{"name":"tchamblee","email":"tchamblee@articulate.com"},{"name":"tecnobrat","email":"brian@tecnobrat.com"},{"name":"tracycaruso","email":"tracy@articulate.com"},{"name":"tylerodonnell","email":"tyler@tylerodonnell.com"},{"name":"vamseek","email":"vamsee@articulate.com"},{"name":"vscerchia","email":"vscerchia@gmail.com"}],"contributors":[{"name":"Articulate Global, Inc.","email":"engineering@articulate.com"},{"name":"Markus Greystone","email":"mgreystone@articulate.com"},{"name":"Spencer Davis","email":"spencerfdavis@gmail.com"},{"name":"Scott McCormack"}],"dist":{"shasum":"682b075bd1b8a7834098fa70c611371f0503ec5d","tarball":"https://registry.npmjs.org/@articulate/asyncios/-/asyncios-1.0.1.tgz","fileCount":11,"integrity":"sha512-XLlhuaYxIIbqlRPUm5+cHC3FyCItuuWrcR+aPWD8M8+XXrlyJ40wLyoEZl7PxOdH1DbiGmuHBu6xA2hOK9Sitw==","signatures":[{"sig":"MEYCIQDDhdRurDyTwyQ66Tz6dxPWpkUEoqT94ZG18XWLB5lTsgIhAM1swAj5s5sz2PWj4MNDMhxm9NEVdjiuRYsLTtHRrGI6","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":15984,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJdTZt8CRA9TVsSAnZWagAANE4P/242x2pTJ25DyczSRiQb\nJ/s1ipYH3gE0URWny2izrjm+3HM34Hipr7/+vTxi5l+PtiPCo+cf3E1oIMMK\nQ15IY7EmLAWBMSwwosUPQozD8GeBAoVs7qeqfsj0Z6uni8ocnxLbd0V+MAbr\nSDslMiYRaSUDVtcoS+n9qt/iJsPH9wH+Lw5PfJ0J9M4UssYXkV7WYl9DZ+6j\nmaK2hfE+5uV+uFphVfIMWJEQ21kO8g6wqfwqGWt6WCTYPfpzCU6zpUgvu4Az\n5SEH2xh0eE3dREBB9VtXd9keItFUmv0J6HA4yqeMozr8HUVQPj1tgGGhO6N9\n7psMM5a+Q7q1Q5LFXb0G4GXWnDnNV5RoA3SjLqYXAyMJR8UZvVE64CaAZOh6\n0mB0v8/GEruIVr/6sC29j5QK/oVMtjT7Ef4YblXA1So0FTGGKnxA2EV35yzb\nhX8SOY7vrbrF0ebjPblKYSkYZn1Hzv7kfzcYr24JRZcmLc1dDO1sW92k2RAk\nRgob+U86z9wkjVu7FRBKNcP6vUjhIgmY5O4HWYrPCVUjkZHu3Bdk1Abpd1np\nYE6U8EiJnyHQdI9wdEco3dV8blLs0MqQX12I67Iv6DzsYnn5XK+C3aZS2tVL\nkOnWi+bZdLKKVZYFfbup3u+ro0j3BF9yHTJ5FIySmt3m1wWaiJGrA+vF6SVx\nWRCL\r\n=jFpg\r\n-----END PGP SIGNATURE-----\r\n"},"main":"index.js","private":false,"scripts":{"lint":"eslint .","test":"karma start --single-run","test:watch":"karma start"},"_npmUser":{"name":"mgreystone","email":"markus.greystone@gmail.com"},"repository":{"url":"git@github.com:articulate/asyncios.git","type":"git"},"description":"A wrapper for promise-based library Axios into a crocks Async","directories":{},"licenseText":"The MIT License (MIT)\n\nCopyright 2019 Articulate Global, Inc\n\nPermission is hereby granted, free of charge, to any person obtaining\na copy of this software and associated documentation files (the\n\"Software\"), to deal in the Software without restriction, including\nwithout limitation the rights to use, copy, modify, merge, publish,\ndistribute, sublicense, and/or sell copies of the Software, and to\npermit persons to whom the Software is furnished to do so, subject to\nthe following conditions:\n\nThe above copyright notice and this permission notice shall be\nincluded in all copies or substantial portions of the Software.\n\nTHE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND,\nEXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF\nMERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND\nNONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE\nLIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION\nOF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION\nWITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.\n","dependencies":{"crocks":"^0.12.3","lodash.assign":"^4.2.0"},"_hasShrinkwrap":false,"devDependencies":{"chai":"^4.2.0","axios":"^0.16.2","jsdom":"^15.1.1","karma":"^4.2.0","mocha":"^6.2.0","sinon":"^7.3.2","eslint":"^6.0.1","watchify":"^3.11.1","browserify":"^16.3.0","karma-mocha":"^1.3.0","karma-polyfill":"^1.0.0","karma-browserify":"^6.1.0","eslint-plugin-es5":"^1.4.1","eslint-plugin-node":"^9.1.0","eslint-plugin-import":"^2.18.1","karma-jsdom-launcher":"^7.1.1","eslint-plugin-promise":"^4.2.1","eslint-config-standard":"^13.0.1","eslint-plugin-standard":"^4.0.0"},"peerDependencies":{"axios":">=0.16.0"},"_npmOperationalInternal":{"tmp":"tmp/asyncios_1.0.1_1565367163776_0.9819404348110108","host":"s3://npm-registry-packages"},"deprecated":"Package no longer supported. Contact Support at https://www.npmjs.com/support for more info."},"1.0.3":{"name":"@articulate/asyncios","version":"1.0.3","author":{"name":"engineering@articulate.com"},"license":"MIT","_id":"@articulate/asyncios@1.0.3","maintainers":[{"name":"botzo","email":"platform@articulate.com"}],"contributors":[{"name":"Articulate Global, Inc.","email":"engineering@articulate.com"},{"name":"Markus Greystone","email":"mgreystone@articulate.com"},{"name":"Spencer Davis","email":"spencerfdavis@gmail.com"},{"name":"Scott McCormack"}],"homepage":"https://github.com/articulate/asyncios#readme","bugs":{"url":"https://github.com/articulate/asyncios/issues"},"dist":{"shasum":"7d186e25f7a3a4052803ca1d4cc6563dd7f2f3d5","tarball":"https://registry.npmjs.org/@articulate/asyncios/-/asyncios-1.0.3.tgz","fileCount":16,"integrity":"sha512-IyUr23S7MkZQvl5blHmerw0rdcj8qngXu+zJPSJBlu5mbxowSFwTCw5zwJZuZ07CyXQLloHE3/A8LN4+pKI6Ug==","signatures":[{"sig":"MEYCIQCq/Q919VVDeKM2yGeNeoKQHEI56ivw+sharotnGSpNvgIhAPMlA7IgXc8p31z63NJ2ir6wQ4jtgtJNJ7lH82TCx+hI","keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U"}],"unpackedSize":19021},"main":"index.js","gitHead":"952d5d7839c41cc3b4034811318c0ea902e38535","private":false,"scripts":{"lint":"eslint .","test":"karma start --single-run","release":"changeset publish","test:watch":"karma start"},"_npmUser":{"name":"botzo","email":"platform@articulate.com"},"repository":{"url":"git+ssh://git@github.com/articulate/asyncios.git","type":"git"},"_npmVersion":"10.9.2","description":"A wrapper for promise-based library Axios into a crocks Async","directories":{},"_nodeVersion":"22.14.0","dependencies":{"crocks":"^0.12.3"},"_hasShrinkwrap":false,"devDependencies":{"chai":"^4.2.0","axios":"^0.16.2","jsdom":"^15.1.1","karma":"^4.2.0","mocha":"^6.2.0","sinon":"^7.3.2","eslint":"^6.0.1","watchify":"^3.11.1","browserify":"^16.3.0","karma-mocha":"^1.3.0","karma-polyfill":"^1.0.0","@changesets/cli":"^2.28.1","karma-browserify":"^6.1.0","eslint-plugin-es5":"^1.4.1","eslint-plugin-node":"^9.1.0","eslint-plugin-import":"^2.18.1","karma-jsdom-launcher":"^7.1.1","eslint-plugin-promise":"^4.2.1","eslint-config-standard":"^13.0.1","eslint-plugin-standard":"^4.0.0"},"peerDependencies":{"axios":">=0.16.0"},"_npmOperationalInternal":{"tmp":"tmp/asyncios_1.0.3_1744298757136_0.3512005995132148","host":"s3://npm-registry-packages-npm-production"},"deprecated":"Package no longer supported. Contact Support at https://www.npmjs.com/support for more info."}},"time":{"created":"2019-07-30T18:52:56.502Z","modified":"2025-11-12T21:23:55.274Z","1.0.0-rc1":"2019-07-30T18:52:56.649Z","1.0.0":"2019-08-02T14:44:10.631Z","1.0.1-rc1":"2019-08-05T15:29:45.913Z","1.0.1-rc2":"2019-08-08T03:19:19.613Z","1.0.1":"2019-08-09T16:12:43.938Z","1.0.3":"2025-04-10T15:25:57.342Z"},"bugs":{"url":"https://github.com/articulate/asyncios/issues"},"author":{"name":"engineering@articulate.com"},"license":"MIT","homepage":"https://github.com/articulate/asyncios#readme","repository":{"url":"git+ssh://git@github.com/articulate/asyncios.git","type":"git"},"description":"A wrapper for promise-based library Axios into a crocks Async","contributors":[{"name":"Articulate Global, Inc.","email":"engineering@articulate.com"},{"name":"Markus Greystone","email":"mgreystone@articulate.com"},{"name":"Spencer Davis","email":"spencerfdavis@gmail.com"},{"name":"Scott McCormack"}],"maintainers":[{"name":"botzo","email":"platform@articulate.com"}],"readme":"# asyncios\n\nA [crocks Async](https://crocks.dev/docs/crocks/Async.html) wrapper for [axios](https://github.com/axios/axios). Allows consumers to take advantage of the \"lazy\" data type while keeping a familiar API.\n\n## How to Use\n\n`asyncios` accepts the same configuration arguments as the underlying axios function. [See the axios documentation for more details](https://github.com/axios/axios#request-config).\n\n```js\n// GET request\nasyncios({ method: 'GET', url: '/user?ID=12345' })\n  .fork(\n    error => console.log(error),\n    response => console.log(response)\n  )\n```\n\n```js\n// same GET request, but using `params` configuration\nasyncios({ method: 'GET', url: '/user', params: { ID: 12345 } })\n  .fork(\n    error => console.log(error),\n    response => console.log(response)\n  )\n```\n\n```js\n// POST request\nasyncios({\n  method: 'POST',\n  url: '/user?ID=12345',\n  data: { firstName: 'Fred', lastName: 'Flinstone' },\n})\n  .fork(\n    error => console.log(error),\n    response => console.log(response)\n  )\n```\n\n### Cancellation\n`Async`-style cancellation is supported. See the [crocks doucmentation for more details](https://crocks.dev/docs/crocks/Async.html).\n\n```js\nconst cancel = asyncios({ method: 'GET', url: '/user?ID=12345' })\n  .fork(\n    error => console.log(error),\n    response => console.log(response),\n    () => console.log('cancelled!')\n  )\n\ncancel()\n```\n\n`axios`'s cancellation token is also supported. Take note of the different behaviors--while cancelling via crocks will invoke `fork`'s third \"cancel\" callback, cancelling via axios will invoke `fork`'s first \"rejected\" callback. [See axios's documentation for more details](https://github.com/axios/axios#cancellation).\n\n```js\nconst source = axios.CancelToken.source()\n\nasyncios({\n  method: 'GET',\n  url: '/user?ID=12345',\n  cancelToken: source.token\n})\n  .fork(\n    error => {\n      if (axios.isCancel(error)) console.log(error.message)\n      else { /* handle error */ }\n    },\n    response => console.log(response)\n  )\n\nsource.cancel('My cancel message')\n\n```\n\n## Thanks\n\nThanks to the fine people who work on both [axios](https://github.com/axios/axios) & [crocks](https://crocks.dev/).\n\n\n## The Name\n\nPretty sure is [spencerfdavis](https://github.com/spencerfdavis)'s fault.\n","readmeFilename":"README.md"}