{"_id":"@0x1eef/postman","_rev":"7-7995cb75e6b8cf11e259e8e8c78f8527","name":"@0x1eef/postman","dist-tags":{"latest":"0.4.0"},"versions":{"0.1.0":{"name":"@0x1eef/postman","version":"0.1.0","author":{"name":"0x1eef"},"license":"0BSDL","_id":"@0x1eef/postman@0.1.0","maintainers":[{"name":"0x1eef","email":"0x1eef@protonmail.com"}],"homepage":"https://github.com/0x1eef/postman#readme","bugs":{"url":"https://github.com/0x1eef/postman/issues"},"dist":{"shasum":"add5dfa531e229705e4ed94bb7d09370cb8fcfab","tarball":"https://registry.npmjs.org/@0x1eef/postman/-/postman-0.1.0.tgz","fileCount":9,"integrity":"sha512-HdyIgEakk0Srv7dJT+wFxWIzswpcPpC6YX+oj7fB60kGxwohwJSFPr8gTOWHcYdPCW9M7OW5y8IP7oiImiCFQg==","signatures":[{"sig":"MEYCIQCNempCo6s7nHRSkqOqcmVL5zagptFMtgGTS/e2uw2j5QIhANvkcdlyNdDl5NR6wZSsI/n/5Jd+/oXvhBjpBVidyyqt","keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U"}],"unpackedSize":7093},"main":"src/index.js","gitHead":"43aaf1384fef8200303f43e0415b1f235f788776","scripts":{"eslint":"npx eslint -- src/*.js src/**/*.js","build-docs":"npx jsdoc src/ -d docs/"},"_npmUser":{"name":"0x1eef","email":"0x1eef@protonmail.com"},"repository":{"url":"git+https://github.com/0x1eef/postman.git","type":"git"},"_npmVersion":"10.9.2","description":"Delivers the assets of a web page asynchronously","directories":{},"_nodeVersion":"23.5.0","publishConfig":{"access":"public"},"_hasShrinkwrap":false,"devDependencies":{"jsdoc":"^4.0.4","eslint":"^8.57.0","@types/node":"^16.18","eslint-config-prettier":"^9.1.0","eslint-config-standard":"^17.1.0","eslint-plugin-prettier":"^5.1.3"},"_npmOperationalInternal":{"tmp":"tmp/postman_0.1.0_1743219286556_0.7349750623873377","host":"s3://npm-registry-packages-npm-production"}},"0.2.0":{"name":"@0x1eef/postman","version":"0.2.0","author":{"name":"0x1eef"},"license":"0BSDL","_id":"@0x1eef/postman@0.2.0","maintainers":[{"name":"0x1eef","email":"0x1eef@protonmail.com"}],"homepage":"https://github.com/0x1eef/postman#readme","bugs":{"url":"https://github.com/0x1eef/postman/issues"},"dist":{"shasum":"cab5e0c7023cad63a9a8d81362df35bb743da6c8","tarball":"https://registry.npmjs.org/@0x1eef/postman/-/postman-0.2.0.tgz","fileCount":9,"integrity":"sha512-aV+UssL6fZb7lztqg8J/cUtWkSkN3jWZgRGKoZFfgmJi9DRVeDop53bppBfsQuL8tO3z8GOSSB3iChb+PAcyBg==","signatures":[{"sig":"MEUCIG5oK1/ku6EDOAaMcC6hr5SSW83EmYXz7/9hdgO7cJ8LAiEA20U7Kssl2B7hQoOL/Zfs0jDgCErS3AbNi1VjSCkIABI=","keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U"}],"unpackedSize":7793},"main":"src/index.js","gitHead":"bdf053504d3ef13a0063d2bf346ebf8cacb66603","scripts":{"eslint":"npx eslint -- src/*.js src/**/*.js","build-docs":"npx jsdoc src/ -d docs/"},"_npmUser":{"name":"0x1eef","email":"0x1eef@protonmail.com"},"repository":{"url":"git+https://github.com/0x1eef/postman.git","type":"git"},"_npmVersion":"10.9.2","description":"Delivers the assets of a web page asynchronously","directories":{},"_nodeVersion":"23.5.0","publishConfig":{"access":"public"},"_hasShrinkwrap":false,"devDependencies":{"jsdoc":"^4.0.4","eslint":"^8.57.0","@types/node":"^16.18","eslint-config-prettier":"^9.1.0","eslint-config-standard":"^17.1.0","eslint-plugin-prettier":"^5.1.3"},"_npmOperationalInternal":{"tmp":"tmp/postman_0.2.0_1743228802740_0.7693442862705253","host":"s3://npm-registry-packages-npm-production"}},"0.2.1":{"name":"@0x1eef/postman","version":"0.2.1","author":{"name":"0x1eef"},"license":"0BSDL","_id":"@0x1eef/postman@0.2.1","maintainers":[{"name":"0x1eef","email":"0x1eef@protonmail.com"}],"homepage":"https://github.com/0x1eef/postman#readme","bugs":{"url":"https://github.com/0x1eef/postman/issues"},"dist":{"shasum":"5dfb9d62455d22c45bdd5ecffb0188c439ce3181","tarball":"https://registry.npmjs.org/@0x1eef/postman/-/postman-0.2.1.tgz","fileCount":9,"integrity":"sha512-nDA2lCtdaH2nDgWYn23Tt93htIHF0AAJlihIH2joCej68uSwcwqm8sntl9tIYdOKIlLOKiSq+SSnqBmul3yq7Q==","signatures":[{"sig":"MEYCIQDvkAcGudTfrLSoEDgvemRTWPyTzebZGxu8D9TpM/q8/gIhAPTlmgkh7byQVhKnNIkWFsF3CAkGawIqzAoFq9xOG+oZ","keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U"}],"unpackedSize":7862},"main":"src/index.js","gitHead":"7151d410e887bf9007098e985fde77cab98a80e2","scripts":{"eslint":"npx eslint -- src/*.js src/**/*.js","build-docs":"npx jsdoc src/ -d docs/"},"_npmUser":{"name":"0x1eef","email":"0x1eef@protonmail.com"},"repository":{"url":"git+https://github.com/0x1eef/postman.git","type":"git"},"_npmVersion":"10.9.2","description":"Delivers the assets of a web page asynchronously","directories":{},"_nodeVersion":"23.5.0","publishConfig":{"access":"public"},"_hasShrinkwrap":false,"devDependencies":{"jsdoc":"^4.0.4","eslint":"^8.57.0","@types/node":"^16.18","eslint-config-prettier":"^9.1.0","eslint-config-standard":"^17.1.0","eslint-plugin-prettier":"^5.1.3"},"_npmOperationalInternal":{"tmp":"tmp/postman_0.2.1_1743229075114_0.44717587496112965","host":"s3://npm-registry-packages-npm-production"}},"0.2.2":{"name":"@0x1eef/postman","version":"0.2.2","author":{"name":"0x1eef"},"license":"0BSDL","_id":"@0x1eef/postman@0.2.2","maintainers":[{"name":"0x1eef","email":"0x1eef@protonmail.com"}],"homepage":"https://github.com/0x1eef/postman#readme","bugs":{"url":"https://github.com/0x1eef/postman/issues"},"dist":{"shasum":"658aebaf069a695c3e6068bef9145972cf300ba3","tarball":"https://registry.npmjs.org/@0x1eef/postman/-/postman-0.2.2.tgz","fileCount":9,"integrity":"sha512-8RiCIlvKY4cHR/M8Wu4ihgoxRpK4iCcAfHpMB837yRSMbbu6YK2yw3JVL4Fzt2Koseq2qzVHDhbu6KKMhzkxHw==","signatures":[{"sig":"MEUCIQCi6ThWIKfYc/PuUS8bKn8eZGY/zj4U06XCS+hDdbYrkgIgB65O5FeBBEL1knxdffHEyjJch9ItUHpIZF6UErDkOrU=","keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U"}],"unpackedSize":7874},"main":"src/index.js","gitHead":"8a2ac87ea201e390f301b1b28a8383f168b9419f","scripts":{"eslint":"npx eslint -- src/*.js src/**/*.js","build-docs":"npx jsdoc src/ -d docs/"},"_npmUser":{"name":"0x1eef","email":"0x1eef@protonmail.com"},"repository":{"url":"git+https://github.com/0x1eef/postman.git","type":"git"},"_npmVersion":"10.9.2","description":"Delivers the assets of a web page asynchronously","directories":{},"_nodeVersion":"23.5.0","publishConfig":{"access":"public"},"_hasShrinkwrap":false,"devDependencies":{"jsdoc":"^4.0.4","eslint":"^8.57.0","@types/node":"^16.18","eslint-config-prettier":"^9.1.0","eslint-config-standard":"^17.1.0","eslint-plugin-prettier":"^5.1.3"},"_npmOperationalInternal":{"tmp":"tmp/postman_0.2.2_1743244277852_0.19271827307373024","host":"s3://npm-registry-packages-npm-production"}},"0.2.3":{"name":"@0x1eef/postman","version":"0.2.3","author":{"name":"0x1eef"},"license":"0BSDL","_id":"@0x1eef/postman@0.2.3","maintainers":[{"name":"0x1eef","email":"0x1eef@protonmail.com"}],"homepage":"https://github.com/0x1eef/postman#readme","bugs":{"url":"https://github.com/0x1eef/postman/issues"},"dist":{"shasum":"cd667f1334719fee369a376ee6a9f7692984c1c3","tarball":"https://registry.npmjs.org/@0x1eef/postman/-/postman-0.2.3.tgz","fileCount":9,"integrity":"sha512-T9RSMxcV0Ase6POqzWk3WsBunEdBlf3v8vwBQDjX99xMW4qDEj5w0V3ivKi27fmY1riOWUwfF9MHGnhirJ7k+Q==","signatures":[{"sig":"MEUCIC/ERYy0wDGUncnapiLMc32HX/lJM12QjS0HvEmW94fOAiEA/C7sd0FgG8U4G5xxyaQx+cvwv/0oVxXWZDp4QRSddz8=","keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U"}],"unpackedSize":7926},"main":"src/index.js","gitHead":"b96d45bc57212667a12652ebfbf6eb06485440d2","scripts":{"eslint":"npx eslint -- src/*.js src/**/*.js","build-docs":"npx jsdoc src/ -d docs/"},"_npmUser":{"name":"0x1eef","email":"0x1eef@protonmail.com"},"repository":{"url":"git+https://github.com/0x1eef/postman.git","type":"git"},"_npmVersion":"10.9.2","description":"Delivers the assets of a web page asynchronously","directories":{},"_nodeVersion":"23.5.0","publishConfig":{"access":"public"},"_hasShrinkwrap":false,"devDependencies":{"jsdoc":"^4.0.4","eslint":"^8.57.0","@types/node":"^16.18","eslint-config-prettier":"^9.1.0","eslint-config-standard":"^17.1.0","eslint-plugin-prettier":"^5.1.3"},"_npmOperationalInternal":{"tmp":"tmp/postman_0.2.3_1743250140658_0.7407975761968137","host":"s3://npm-registry-packages-npm-production"}},"0.3.0":{"name":"@0x1eef/postman","version":"0.3.0","author":{"name":"0x1eef"},"license":"0BSDL","_id":"@0x1eef/postman@0.3.0","maintainers":[{"name":"0x1eef","email":"0x1eef@protonmail.com"}],"homepage":"https://github.com/0x1eef/postman#readme","bugs":{"url":"https://github.com/0x1eef/postman/issues"},"dist":{"shasum":"78b411d6e95f004cddc68192c80cda1df0e26110","tarball":"https://registry.npmjs.org/@0x1eef/postman/-/postman-0.3.0.tgz","fileCount":9,"integrity":"sha512-vLdhqVce/1+e8Yj1bzEpmRp6ifAL+XVdWjknL8IwFnGG27DpoYX5/JMfa1s23LyILYLf1SWvCFgwq3f2vcSOJQ==","signatures":[{"sig":"MEUCIQCD97RRFe00Xc5540EdFbrTLB8UI4lZQlbq5xaScMXEhwIgfPQPsXCn6NnikEbnL2VRa1VRqsLlXW/R5EgPrxViLT4=","keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U"}],"unpackedSize":7949},"main":"src/index.js","gitHead":"8727795e90b95bceef9ab57a3b123bbf9b5a9679","scripts":{"eslint":"npx eslint -- src/*.js src/**/*.js","build-docs":"npx jsdoc src/ -d docs/"},"_npmUser":{"name":"0x1eef","email":"0x1eef@protonmail.com"},"repository":{"url":"git+https://github.com/0x1eef/postman.git","type":"git"},"_npmVersion":"10.9.2","description":"Delivers the assets of a web page asynchronously","directories":{},"_nodeVersion":"23.5.0","publishConfig":{"access":"public"},"_hasShrinkwrap":false,"devDependencies":{"jsdoc":"^4.0.4","eslint":"^8.57.0","@types/node":"^16.18","eslint-config-prettier":"^9.1.0","eslint-config-standard":"^17.1.0","eslint-plugin-prettier":"^5.1.3"},"_npmOperationalInternal":{"tmp":"tmp/postman_0.3.0_1747405339108_0.241050913875134","host":"s3://npm-registry-packages-npm-production"}},"0.4.0":{"name":"@0x1eef/postman","version":"0.4.0","description":"Delivers the assets of a web page asynchronously","main":"src/index.js","repository":{"type":"git","url":"git+https://github.com/0x1eef/postman.git"},"scripts":{"build-docs":"npx jsdoc src/ -d docs/","eslint":"npx eslint -- src/*.js src/**/*.js"},"author":{"name":"0x1eef"},"license":"0BSDL","devDependencies":{"@types/node":"^16.18","eslint":"^8.57.0","eslint-config-prettier":"^9.1.0","eslint-config-standard":"^17.1.0","eslint-plugin-prettier":"^5.1.3","jsdoc":"^4.0.4"},"publishConfig":{"access":"public"},"_id":"@0x1eef/postman@0.4.0","gitHead":"80360acfa3e249f8d86a9b440cd40de8ebf63627","bugs":{"url":"https://github.com/0x1eef/postman/issues"},"homepage":"https://github.com/0x1eef/postman#readme","_nodeVersion":"23.5.0","_npmVersion":"10.9.2","dist":{"integrity":"sha512-rqa6bbtDE19y5BeXxmMVYeyPdZZ7UxOfXApKrKkW1UDiZhVXaRZV6AfM1lpO2HvGgk9Rc30YO/8AMDRGLp+YFQ==","shasum":"6914cea31b9b1240b2c95b5a8a0e4dc1901a1d8e","tarball":"https://registry.npmjs.org/@0x1eef/postman/-/postman-0.4.0.tgz","fileCount":9,"unpackedSize":8536,"signatures":[{"keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U","sig":"MEYCIQCsItM0dNg4nT1Iu8JNkzDlswBG2ybROh7VcXn0ghd1SQIhALMnqKzpBqDXKHuctbY0DjSlvThzsugaqN6cuIcfisvs"}]},"_npmUser":{"name":"0x1eef","email":"0x1eef@protonmail.com"},"directories":{},"maintainers":[{"name":"0x1eef","email":"0x1eef@protonmail.com"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages-npm-production","tmp":"tmp/postman_0.4.0_1747490097814_0.12919319050043043"},"_hasShrinkwrap":false}},"time":{"created":"2025-03-29T03:34:46.476Z","modified":"2025-05-17T13:54:58.163Z","0.1.0":"2025-03-29T03:34:46.752Z","0.2.0":"2025-03-29T06:13:22.947Z","0.2.1":"2025-03-29T06:17:55.368Z","0.2.2":"2025-03-29T10:31:18.044Z","0.2.3":"2025-03-29T12:09:00.854Z","0.3.0":"2025-05-16T14:22:19.294Z","0.4.0":"2025-05-17T13:54:57.992Z"},"bugs":{"url":"https://github.com/0x1eef/postman/issues"},"author":{"name":"0x1eef"},"license":"0BSDL","homepage":"https://github.com/0x1eef/postman#readme","repository":{"type":"git","url":"git+https://github.com/0x1eef/postman.git"},"description":"Delivers the assets of a web page asynchronously","maintainers":[{"name":"0x1eef","email":"0x1eef@protonmail.com"}],"readme":"## About\n\nPostman is a lightweight library that can download the\nassets of a web page asynchronously. A classic use-case\nmight be a progress bar that is updated as assets are\ndownloaded.\n\n## Example\n\n### Postman\n\n#### Deliver\n\nThe \"deliver\" method initiates the download of a parcel that includes\nfonts, stylesheets and scripts. Each time an item is downloaded, the\nprogress event is dispatched. When all items have been downloaded, the\nparcel is ready to be inserted into the DOM. Typically `document.fonts`\nis used to append fonts, `document.head` is used to append styles, and\n`document.body` is used to append scripts:\n\n```javascript\nimport { Postman, item } from \"postman\";\n\nconst items = [\n  item.font(\"Roboto Regular\", \"/fonts/roboto-regular.ttf\"),\n  item.css(\"/css/main.css\"),\n  item.script(\"/js/main.js\")\n]\n\nconst postman = Postman(...items)\npostman.addEventListener(\"progress\", (event) => {\n  const { progress, parcel } = event.detail\n  console.info(\"progress\", progress)\n  if (progress === 100) {\n    parcel.fonts.forEach((font) => document.fonts.add(font))\n    parcel.css.forEach((style) => document.head.appendChild(style))\n    parcel.scripts.forEach((script) => document.body.appendChild(script))\n  }\n})\npostman.deliver()\n```\n\n#### Error\n\nAn \"error\" event is dispatched when an item fails to download, and\nthat includes any item that was fetched with a response code other\nthan 200. The dispatched event provides access to an instance of\n[AbortController](https://developer.mozilla.org/en-US/docs/Web/API/AbortController)\nthat can be used to cancel the download of the remaining items,\notherwise the download will continue:\n\n```javascript\nimport { Postman, item } from \"postman\";\n\nconst items = [\n  item.font(\"Roboto Regular\", \"/fonts/roboto-regular.ttf\"),\n  item.css(\"/css/main.css\"),\n  item.script(\"/js/main.js\")\n]\n\nconst postman = Postman(...items)\npostman.addEventListener(\"error\", (event) => {\n  const { controller } = event.detail\n  controller.abort()\n  console.error(\"error encountered, download cancelled\")\n})\npostman.deliver()\n```\n\n## See also\n\n* [https://0x1eef.github.io/](https://0x1eef.github.io) <br>\n  Delivers assets with Postman\n* [https://al-quran.reflectslight.io/](https://al-quran.reflectslight.io) <br>\n  Delivers all of its assets with Postman\n\n## Sources\n\n* [github.com/@0x1eef](https://github.com/0x1eef/postman)\n* [gitlab.com/@0x1eef](https://gitlab.com/0x1eef/postman)\n* [brew.bsd.cafe/@0x1eef](https://brew.bsd.cafe/0x1eef/postman)\n\n## License\n\n[BSD Zero Clause](https://choosealicense.com/licenses/0bsd/)\n<br>\nSee [LICENSE](./LICENSE)\n\n","readmeFilename":"README.md"}