{"_id":"@remix-run/web-blob","_rev":"7-dd3d8f81b6eca5d2af793bd84de243ba","name":"@remix-run/web-blob","dist-tags":{"pre":"3.1.0-pre.0","latest":"3.1.0"},"versions":{"3.0.4":{"name":"@remix-run/web-blob","version":"3.0.4","keywords":["blob","typed"],"author":{"url":"https://gozala.io","name":"Irakli Gozalishvili","email":"dev@gozala.io"},"license":"MIT","_id":"@remix-run/web-blob@3.0.4","maintainers":[{"name":"chancestrickland","email":"hi@chance.dev"},{"name":"mjackson","email":"npm@mjackson.me"}],"homepage":"https://github.com/remix-run/web-std-io#readme","bugs":{"url":"https://github.com/remix-run/web-std-io/issues"},"dist":{"shasum":"99c67b9d0fb641bd0c07d267fd218ae5aa4ae5ed","tarball":"https://registry.npmjs.org/@remix-run/web-blob/-/web-blob-3.0.4.tgz","fileCount":28,"integrity":"sha512-AfegzZvSSDc+LwnXV+SwROTrDtoLiPxeFW+jxgvtDAnkuCX1rrzmVJ6CzqZ1Ai0bVfmJadkG5GxtAfYclpPmgw==","signatures":[{"sig":"MEYCIQCgzE1beTnN9yvkxc7O342/3c2MzCRbPh+x1x85WledEQIhAOIlBtevq8Dh2QapzD1qy58WpVXSFdz8Aj+mbIUspsDh","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":44942,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v4.10.10\r\nComment: https://openpgpjs.org\r\n\r\nwsFzBAEBCAAGBQJiaxFNACEJED1NWxICdlZqFiEECWMYAoorWMhJKdjhPU1b\r\nEgJ2VmpMVBAAjdrMcANIBun2JuDAQsGaXQBwL6cHwYeke46lTl0/kGxlDbmc\r\n2INdFsJVQNz9DH3PjO4bGEucHMJs9X9+BbVudVtOiYw07VI7iQIjpwYlWTOr\r\nRVCPrZEn5TaOpaIeYHwlCGAV8HxLE6MCbt9JteEBMoA3BbtFxw8eHwnhufVO\r\nAEFv8MeYwXTYvzEhJ58yWzZdHbbEXLWXJ9hNqXK096Jy92+h5GuVqs/IN7Z1\r\n3+ut6PGB7CaNWH8KooyrHfc+NuDqOf8SjbhdI13SkeP0Akpy7lorquWxwyaa\r\niXz4Zyanoe61n+9YQ/R1LueHD0IQnAACOIY9WrWCF0PmMN9esv5z+5aWCbca\r\nDgCrXrIyst9ymVE7CTt1/ccXuDyij2CcMzbXlz7jm6s4w5PWOhDvytXMpDeg\r\nHBOoVHIgnb2XnjUdxaR2RnTMOn8hg1x/A4rC1b2xFjSaQ0TpABlY0hyclf1m\r\nWjohvIOwmd00SisVaZbFkY8M+73+/qpz4/z7nVMXsFZhcvHd57K0nb5Gqaiz\r\nJXBjfgWTqdpelRzuMeYO60UxFNpdexuiR9WizyqycZ61nlM9PqQgNLhQl0D1\r\njBff0drk/Ls4jMDV8xZbFWyCcrSfjEYfAdfeYPq7ri+iSMkFlh/n6Gh7MWNK\r\nsoH4gBW8XHVYVK2X0eLhJgVW+vnsbApbPfo=\r\n=eml6\r\n-----END PGP SIGNATURE-----\r\n"},"main":"./dist/src/lib.node.cjs","type":"module","types":"./dist/src/lib.d.ts","module":"./src/lib.js","exports":{".":{"types":"./dist/src/lib.d.ts","import":"./src/lib.node.js","browser":"./src/lib.js","require":"./dist/src/lib.node.cjs"}},"gitHead":"acfbdba347005e9adf2c72886d4720e659dc20dc","scripts":{"test":"npm run test:es && npm run test:web && npm run test:cjs","build":"npm run build:cjs && npm run build:types","check":"tsc --build","prepare":"npm run build","test:es":"uvu test all.spec.js","test:cjs":"rimraf dist && npm run build && node dist/test/all.spec.cjs","test:web":"playwright-test -r uvu test/web.spec.js","build:cjs":"rollup --config rollup.config.js","precommit":"lint-staged","build:types":"tsc --build"},"_npmUser":{"name":"mjackson","email":"npm@mjackson.me"},"repository":{"url":"git+https://github.com/remix-run/web-std-io.git","type":"git"},"_npmVersion":"8.5.0","description":"Web API compatible Blob implementation","directories":{},"lint-staged":{"*.js":["prettier --no-semi --write","git add"]},"_nodeVersion":"16.14.2","dependencies":{"web-encoding":"1.1.5","@remix-run/web-stream":"^1.0.0"},"_hasShrinkwrap":false,"devDependencies":{"uvu":"0.5.2","husky":"^6.0.0","rimraf":"3.0.2","rollup":"2.47.0","prettier":"^2.3.0","typescript":"^4.4.4","@types/node":"15.0.2","lint-staged":"^11.0.0","git-validate":"2.2.4","@web-std/fetch":"^3.0.0","playwright-test":"^7.2.0","rollup-plugin-multi-input":"1.2.0"},"_npmOperationalInternal":{"tmp":"tmp/web-blob_3.0.4_1651183949172_0.38990774008926876","host":"s3://npm-registry-packages"}},"3.0.5":{"name":"@remix-run/web-blob","version":"3.0.5","keywords":["blob","typed"],"author":{"url":"https://gozala.io","name":"Irakli Gozalishvili","email":"dev@gozala.io"},"license":"MIT","_id":"@remix-run/web-blob@3.0.5","maintainers":[{"name":"chancestrickland","email":"hi@chance.dev"},{"name":"mjackson","email":"npm@mjackson.me"}],"homepage":"https://github.com/remix-run/web-std-io#readme","bugs":{"url":"https://github.com/remix-run/web-std-io/issues"},"dist":{"shasum":"ead1d7334aafc8a8adcaea67cac8afca887e0f72","tarball":"https://registry.npmjs.org/@remix-run/web-blob/-/web-blob-3.0.5.tgz","fileCount":28,"integrity":"sha512-Mungj3erqCrq0+5zU/34NkeC2g+U7K6Uwa8uNiZgANvw0Wc64wKglk4MPQJZA0Y2tgPYXyrRn7uw4q75j6Hhww==","signatures":[{"sig":"MEQCIDOORZzIMpTeXQjSq7JCRMwVDlyQRVEEljIB7CuGNELaAiBiOFsz51Ky104oqlFyO83kzme/LR7gF7lJzOB0lsdvig==","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":45008},"main":"./dist/src/lib.node.cjs","type":"module","types":"./dist/src/lib.d.ts","module":"./src/lib.js","exports":{".":{"types":"./dist/src/lib.d.ts","import":"./src/lib.node.js","browser":"./src/lib.js","require":"./dist/src/lib.node.cjs"}},"gitHead":"4fc5047f3a54a07ffea81347ff5063b5874d3cf0","scripts":{"test":"npm run test:es && npm run test:web && npm run test:cjs","build":"npm run build:cjs && npm run build:types","check":"tsc --build","prepare":"npm run build","test:es":"uvu test all.spec.js","test:cjs":"rimraf dist && npm run build && node dist/test/all.spec.cjs","test:web":"playwright-test -r uvu test/web.spec.js","build:cjs":"rollup --config rollup.config.js","precommit":"lint-staged","build:types":"tsc --build"},"_npmUser":{"name":"mjackson","email":"npm@mjackson.me"},"repository":{"url":"git+https://github.com/remix-run/web-std-io.git","type":"git"},"_npmVersion":"8.19.4","description":"Web API compatible Blob implementation","directories":{},"lint-staged":{"*.js":["prettier --no-semi --write","git add"]},"_nodeVersion":"16.20.1","dependencies":{"web-encoding":"1.1.5","@remix-run/web-stream":"^1.0.4"},"_hasShrinkwrap":false,"devDependencies":{"uvu":"0.5.2","husky":"^6.0.0","rimraf":"3.0.2","rollup":"2.47.0","prettier":"^2.3.0","typescript":"^4.4.4","@types/node":"15.0.2","lint-staged":"^11.0.0","git-validate":"2.2.4","playwright-test":"^7.2.0","@remix-run/web-fetch":"^4.3.6","rollup-plugin-multi-input":"1.2.0"},"_npmOperationalInternal":{"tmp":"tmp/web-blob_3.0.5_1690927931776_0.8989188423494563","host":"s3://npm-registry-packages"}},"3.1.0-pre.0":{"name":"@remix-run/web-blob","version":"3.1.0-pre.0","keywords":["blob","typed"],"author":{"url":"https://gozala.io","name":"Irakli Gozalishvili","email":"dev@gozala.io"},"license":"MIT","_id":"@remix-run/web-blob@3.1.0-pre.0","maintainers":[{"name":"chancestrickland","email":"hi@chance.dev"},{"name":"mjackson","email":"mjijackson+npm@gmail.com"}],"homepage":"https://github.com/remix-run/web-std-io#readme","bugs":{"url":"https://github.com/remix-run/web-std-io/issues"},"dist":{"shasum":"eae9f36e48395cf483b97becbbb71d40360d9bef","tarball":"https://registry.npmjs.org/@remix-run/web-blob/-/web-blob-3.1.0-pre.0.tgz","fileCount":28,"integrity":"sha512-TcxrfMv1RWSVKdtueh70kvtxTeNeyCsqHQhOZA8EoKhGCEhIoP1fHIGkHWdwxTheoRYJzhncuJi9V3yBiPNlxA==","signatures":[{"sig":"MEUCIEci3X/biD9F39cQfrjPxa+SVWe1klycNusHYxK7LY4oAiEAjoYOmNgMLtk9gmTXzqJAT1PKeiy/S9f4D0HZhT2VByY=","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":45091},"main":"./dist/src/lib.node.cjs","type":"module","types":"./dist/src/lib.d.ts","module":"./src/lib.js","readme":"# @remix-run/web-blob\n\n[![ci][ci.icon]][ci.url]\n[![package][version.icon] ![downloads][downloads.icon]][package.url]\n[![styled with prettier][prettier.icon]][prettier.url]\n\nWeb API compatible [Blob][] for nodejs.\n\n## Comparison to Alternatives\n\n#### [fetch-blob][]\n\nThe reason this library exists is because [fetch-blob][] chooses to compromise\nWeb API compatibility of [`blob.stream()`][w3c blob.stream] by using nodejs\nnative [Readable][] stream. We found this to be problematic when sharing code\nacross nodejs and browser runtimes. Instead this library stays true to the\nspecification by using [ReadableStream][] implementation from [@remix-run/web-stream][]\nlibrary even if that is less convenient in nodejs context.\n\n> Note: Both node [Readable][] streams and web [ReadableStream][] implement\n> `AsyncIterable` interface and in theory either could be used with [for await][]\n> loops. In practice however major browsers do not yet ship `AsyncIterable`\n> support for [ReadableStream][]s which in our experience makes choice made by\n> [node-fetch][] impractical.\n\n[fetch-blob][] is build around node [Buffer][]s. This implementation is built\naround standard [Uint8Array][]s.\n\n[fetch-blob] chooses to use [WeakMap][]s for encapsulating private state. This\nlibrary chooses to use to use properties with names that start with `_`. While\nthose properties aren't truly private they do have better performance profile\nand make it possible to interop with this library, which we found impossible\nto do with [node-fetch][].\n\n### Usage\n\n```js\nimport { Blob } from \"@remix-run/web-blob\"\nconst blob = new Blob([\"hello\", new TextEncoder().encode(\"world\")])\nfor await (const chunk of blob.stream()) {\n  console.log(chunk)\n}\n```\n\n### Usage from Typescript\n\nThis library makes use of [typescript using JSDOC annotations][ts-jsdoc] and\nalso generates type definitions along with typed definition maps. So you should\nbe able to get all the type inference out of the box.\n\n## Install\n\n    npm install @remix-run/web-blob\n\n[ci.icon]: https://github.com/web-std/io/workflows/blob/badge.svg\n[ci.url]: https://github.com/web-std/io/actions/workflows/blob.yml\n[version.icon]: https://img.shields.io/npm/v/@remix-run/web-blob.svg\n[downloads.icon]: https://img.shields.io/npm/dm/@remix-run/web-blob.svg\n[package.url]: https://npmjs.org/package/@remix-run/web-blob\n[downloads.image]: https://img.shields.io/npm/dm/@remix-run/web-blob.svg\n[downloads.url]: https://npmjs.org/package/@remix-run/web-blob\n[prettier.icon]: https://img.shields.io/badge/styled_with-prettier-ff69b4.svg\n[prettier.url]: https://github.com/prettier/prettier\n[blob]: https://developer.mozilla.org/en-US/docs/Web/API/Blob/Blob\n[fetch-blob]: https://github.com/node-fetch/fetch-blob\n[readablestream]: https://developer.mozilla.org/en-US/docs/Web/API/ReadableStream\n[readable]: https://nodejs.org/api/stream.html#stream_readable_streams\n[w3c blob.stream]: https://w3c.github.io/FileAPI/#dom-blob-stream\n[@remix-run/web-stream]: https://github.com/web-std/io/tree/main/stream\n[for await]: https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Statements/for-await...of\n[buffer]: https://nodejs.org/api/buffer.html\n[weakmap]: https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/WeakMap\n[ts-jsdoc]: https://www.typescriptlang.org/docs/handbook/jsdoc-supported-types.html\n[uint8array]: https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Uint8Array\n[node-fetch]: https://github.com/node-fetch/\n","exports":{".":{"types":"./dist/src/lib.d.ts","import":"./src/lib.node.js","browser":{"import":"./src/lib.js","require":"./dist/src/lib.cjs"},"require":"./dist/src/lib.node.cjs"}},"gitHead":"e5fa79431539db79f0963cd317639a866619524e","scripts":{"test":"npm run test:es && npm run test:web && npm run test:cjs","build":"npm run build:cjs && npm run build:types","prepare":"npm run build","test:es":"uvu test all.spec.js","test:cjs":"rimraf dist && npm run build && node dist/test/all.spec.cjs","test:web":"playwright-test -r uvu test/web.spec.js","build:cjs":"rollup --config rollup.config.js","precommit":"lint-staged","typecheck":"tsc","build:types":"tsc --build"},"_npmUser":{"name":"mjackson","email":"mjijackson+npm@gmail.com"},"repository":{"url":"git+https://github.com/remix-run/web-std-io.git","type":"git"},"_npmVersion":"8.19.4","description":"Web API compatible Blob implementation","directories":{},"lint-staged":{"*.js":["prettier --no-semi --write","git add"]},"_nodeVersion":"16.20.2","dependencies":{"web-encoding":"1.1.5","@remix-run/web-stream":"^1.1.0-pre.0"},"_hasShrinkwrap":false,"readmeFilename":"Readme.md","devDependencies":{"uvu":"0.5.2","husky":"^6.0.0","rimraf":"3.0.2","rollup":"2.47.0","prettier":"^2.3.0","typescript":"^4.4.4","@types/node":"15.0.2","lint-staged":"^11.0.0","git-validate":"2.2.4","playwright-test":"^7.2.0","@remix-run/web-fetch":"^4.4.0-pre.0","rollup-plugin-multi-input":"1.2.0"},"_npmOperationalInternal":{"tmp":"tmp/web-blob_3.1.0-pre.0_1693587182349_0.7414064440754224","host":"s3://npm-registry-packages"}},"3.1.0":{"name":"@remix-run/web-blob","version":"3.1.0","keywords":["blob","typed"],"author":{"url":"https://gozala.io","name":"Irakli Gozalishvili","email":"dev@gozala.io"},"license":"MIT","_id":"@remix-run/web-blob@3.1.0","maintainers":[{"name":"chancestrickland","email":"hi@chance.dev"},{"name":"mjackson","email":"mjijackson+npm@gmail.com"}],"homepage":"https://github.com/remix-run/web-std-io#readme","bugs":{"url":"https://github.com/remix-run/web-std-io/issues"},"dist":{"shasum":"e0c669934c1eb6028960047e57a13ed38bbfb434","tarball":"https://registry.npmjs.org/@remix-run/web-blob/-/web-blob-3.1.0.tgz","fileCount":28,"integrity":"sha512-owGzFLbqPH9PlKb8KvpNJ0NO74HWE2euAn61eEiyCXX/oteoVzTVSN8mpLgDjaxBf2btj5/nUllSUgpyd6IH6g==","signatures":[{"sig":"MEYCIQCmSbLd8nYasMSvdmhbVjqNN/KBTnFVRli2IpzI/Fa85gIhAKqpwPVZ4NqazHIUhnDknIgtkl//xrBgCGs27mNI0rY1","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":45073},"main":"./dist/src/lib.node.cjs","type":"module","types":"./dist/src/lib.d.ts","module":"./src/lib.js","exports":{".":{"types":"./dist/src/lib.d.ts","import":"./src/lib.node.js","browser":{"import":"./src/lib.js","require":"./dist/src/lib.cjs"},"require":"./dist/src/lib.node.cjs"}},"gitHead":"e8418530bada7cbaaf224106384ce427b4341222","scripts":{"test":"npm run test:es && npm run test:web && npm run test:cjs","build":"npm run build:cjs && npm run build:types","prepare":"npm run build","test:es":"uvu test all.spec.js","test:cjs":"rimraf dist && npm run build && node dist/test/all.spec.cjs","test:web":"playwright-test -r uvu test/web.spec.js","build:cjs":"rollup --config rollup.config.js","precommit":"lint-staged","typecheck":"tsc","build:types":"tsc --build"},"_npmUser":{"name":"mjackson","email":"mjijackson+npm@gmail.com"},"repository":{"url":"git+https://github.com/remix-run/web-std-io.git","type":"git"},"_npmVersion":"8.19.4","description":"Web API compatible Blob implementation","directories":{},"lint-staged":{"*.js":["prettier --no-semi --write","git add"]},"_nodeVersion":"16.20.2","dependencies":{"web-encoding":"1.1.5","@remix-run/web-stream":"^1.1.0"},"_hasShrinkwrap":false,"devDependencies":{"uvu":"0.5.2","husky":"^6.0.0","rimraf":"3.0.2","rollup":"2.47.0","prettier":"^2.3.0","typescript":"^4.4.4","@types/node":"15.0.2","lint-staged":"^11.0.0","git-validate":"2.2.4","playwright-test":"^7.2.0","@remix-run/web-fetch":"^4.4.0","rollup-plugin-multi-input":"1.2.0"},"_npmOperationalInternal":{"tmp":"tmp/web-blob_3.1.0_1694622390117_0.5603446669203385","host":"s3://npm-registry-packages"}}},"time":{"created":"2022-04-28T22:12:29.090Z","modified":"2026-02-12T01:12:06.391Z","3.0.4":"2022-04-28T22:12:29.359Z","3.0.5":"2023-08-01T22:12:11.980Z","3.1.0-pre.0":"2023-09-01T16:53:02.607Z","3.1.0":"2023-09-13T16:26:30.364Z"},"bugs":{"url":"https://github.com/remix-run/web-std-io/issues"},"author":{"url":"https://gozala.io","name":"Irakli Gozalishvili","email":"dev@gozala.io"},"license":"MIT","homepage":"https://github.com/remix-run/web-std-io#readme","keywords":["blob","typed"],"repository":{"url":"git+https://github.com/remix-run/web-std-io.git","type":"git"},"description":"Web API compatible Blob implementation","maintainers":[{"email":"mjijackson+npm@gmail.com","name":"mjackson"}],"readme":"# @remix-run/web-blob\n\n[![ci][ci.icon]][ci.url]\n[![package][version.icon] ![downloads][downloads.icon]][package.url]\n[![styled with prettier][prettier.icon]][prettier.url]\n\nWeb API compatible [Blob][] for nodejs.\n\n## Comparison to Alternatives\n\n#### [fetch-blob][]\n\nThe reason this library exists is because [fetch-blob][] chooses to compromise\nWeb API compatibility of [`blob.stream()`][w3c blob.stream] by using nodejs\nnative [Readable][] stream. We found this to be problematic when sharing code\nacross nodejs and browser runtimes. Instead this library stays true to the\nspecification by using [ReadableStream][] implementation from [@remix-run/web-stream][]\nlibrary even if that is less convenient in nodejs context.\n\n> Note: Both node [Readable][] streams and web [ReadableStream][] implement\n> `AsyncIterable` interface and in theory either could be used with [for await][]\n> loops. In practice however major browsers do not yet ship `AsyncIterable`\n> support for [ReadableStream][]s which in our experience makes choice made by\n> [node-fetch][] impractical.\n\n[fetch-blob][] is build around node [Buffer][]s. This implementation is built\naround standard [Uint8Array][]s.\n\n[fetch-blob] chooses to use [WeakMap][]s for encapsulating private state. This\nlibrary chooses to use to use properties with names that start with `_`. While\nthose properties aren't truly private they do have better performance profile\nand make it possible to interop with this library, which we found impossible\nto do with [node-fetch][].\n\n### Usage\n\n```js\nimport { Blob } from \"@remix-run/web-blob\"\nconst blob = new Blob([\"hello\", new TextEncoder().encode(\"world\")])\nfor await (const chunk of blob.stream()) {\n  console.log(chunk)\n}\n```\n\n### Usage from Typescript\n\nThis library makes use of [typescript using JSDOC annotations][ts-jsdoc] and\nalso generates type definitions along with typed definition maps. So you should\nbe able to get all the type inference out of the box.\n\n## Install\n\n    npm install @remix-run/web-blob\n\n[ci.icon]: https://github.com/web-std/io/workflows/blob/badge.svg\n[ci.url]: https://github.com/web-std/io/actions/workflows/blob.yml\n[version.icon]: https://img.shields.io/npm/v/@remix-run/web-blob.svg\n[downloads.icon]: https://img.shields.io/npm/dm/@remix-run/web-blob.svg\n[package.url]: https://npmjs.org/package/@remix-run/web-blob\n[downloads.image]: https://img.shields.io/npm/dm/@remix-run/web-blob.svg\n[downloads.url]: https://npmjs.org/package/@remix-run/web-blob\n[prettier.icon]: https://img.shields.io/badge/styled_with-prettier-ff69b4.svg\n[prettier.url]: https://github.com/prettier/prettier\n[blob]: https://developer.mozilla.org/en-US/docs/Web/API/Blob/Blob\n[fetch-blob]: https://github.com/node-fetch/fetch-blob\n[readablestream]: https://developer.mozilla.org/en-US/docs/Web/API/ReadableStream\n[readable]: https://nodejs.org/api/stream.html#stream_readable_streams\n[w3c blob.stream]: https://w3c.github.io/FileAPI/#dom-blob-stream\n[@remix-run/web-stream]: https://github.com/web-std/io/tree/main/stream\n[for await]: https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Statements/for-await...of\n[buffer]: https://nodejs.org/api/buffer.html\n[weakmap]: https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/WeakMap\n[ts-jsdoc]: https://www.typescriptlang.org/docs/handbook/jsdoc-supported-types.html\n[uint8array]: https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Uint8Array\n[node-fetch]: https://github.com/node-fetch/\n","readmeFilename":"Readme.md"}