{"_id":"text-decoder","_rev":"4569019","name":"text-decoder","description":"Streaming text decoder that preserves multibyte Unicode characters","dist-tags":{"latest":"1.2.7"},"maintainers":[{"name":"mafintosh","email":""}],"time":{"modified":"2026-04-10T15:21:16.000Z","created":"2023-08-15T12:13:05.144Z","1.2.7":"2026-02-16T10:20:59.609Z","1.2.6":"2026-02-13T21:28:07.979Z","1.2.5":"2026-02-13T15:53:04.435Z","1.2.4":"2026-02-13T08:59:32.407Z","1.2.3":"2024-12-14T07:20:45.554Z","1.2.2":"2024-12-06T11:23:52.323Z","1.2.1":"2024-10-18T09:40:45.701Z","1.2.0":"2024-09-12T11:33:46.010Z","1.1.1":"2024-07-08T08:22:46.734Z","1.1.0":"2024-04-25T08:27:53.611Z","1.0.1":"2023-08-15T12:17:56.521Z","1.0.0":"2023-08-15T12:13:05.144Z"},"users":{},"author":{"name":"Holepunch"},"repository":{"type":"git","url":"git+https://github.com/holepunchto/text-decoder.git"},"versions":{"1.2.7":{"name":"text-decoder","version":"1.2.7","description":"Streaming text decoder that preserves multibyte Unicode characters","exports":{"./package":"./package.json",".":"./index.js"},"scripts":{"format":"prettier --write .","lint":"prettier --check . && lunte","test":"npm run test:node && npm run test:bare","test:node":"brittle-node test.js","test:bare":"brittle-bare test.js"},"repository":{"type":"git","url":"git+https://github.com/holepunchto/text-decoder.git"},"author":{"name":"Holepunch"},"license":"Apache-2.0","bugs":{"url":"https://github.com/holepunchto/text-decoder/issues"},"homepage":"https://github.com/holepunchto/text-decoder#readme","dependencies":{"b4a":"^1.6.4"},"devDependencies":{"brittle":"^3.3.2","lunte":"^1.3.0","prettier":"^3.6.2","prettier-config-holepunch":"^1.0.0"},"gitHead":"7d61ece8d9f89788b7a209125ada4b0209038a9f","_id":"text-decoder@1.2.7","_nodeVersion":"24.10.0","_npmVersion":"11.6.4","dist":{"shasum":"5d073a9a74b9c0a9d28dfadcab96b604af57d8ba","size":6277,"noattachment":false,"key":"/text-decoder/-/text-decoder-1.2.7.tgz","tarball":"http://registry.cnpm.dingdandao.com/text-decoder/download/text-decoder-1.2.7.tgz"},"_npmUser":{"name":"kasperisager","email":"kasperisager@hey.com"},"directories":{},"maintainers":[{"name":"mafintosh","email":""}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages-npm-production","tmp":"tmp/text-decoder_1.2.7_1771237259473_0.946208210801762"},"_hasShrinkwrap":false,"_cnpmcore_publish_time":"2026-02-16T10:20:59.609Z","publish_time":1771237259609,"_source_registry_name":"default","_cnpm_publish_time":1771237259609},"1.2.6":{"name":"text-decoder","version":"1.2.6","description":"Streaming text decoder that preserves multibyte Unicode characters","main":"index.js","browser":{"./lib/pass-through-decoder.js":"./lib/browser-decoder.js","./lib/utf8-decoder.js":"./lib/browser-decoder.js"},"react-native":{"./lib/pass-through-decoder.js":"./lib/pass-through-decoder.js","./lib/utf8-decoder.js":"./lib/utf8-decoder.js"},"scripts":{"format":"prettier --write .","lint":"prettier --check . && lunte","test":"npm run test:node && npm run test:bare","test:node":"brittle-node test.js","test:bare":"brittle-bare test.js"},"repository":{"type":"git","url":"git+https://github.com/holepunchto/text-decoder.git"},"author":{"name":"Holepunch"},"license":"Apache-2.0","bugs":{"url":"https://github.com/holepunchto/text-decoder/issues"},"homepage":"https://github.com/holepunchto/text-decoder#readme","dependencies":{"b4a":"^1.6.4"},"devDependencies":{"brittle":"^3.3.2","lunte":"^1.3.0","prettier":"^3.6.2","prettier-config-holepunch":"^1.0.0"},"gitHead":"14cc9056be10925aaeaaeb610faf5b8bd38acf52","_id":"text-decoder@1.2.6","_nodeVersion":"24.10.0","_npmVersion":"11.6.4","dist":{"shasum":"593f57c785b0d4ff381d50ea5372d7ec40f5a163","size":6111,"noattachment":false,"key":"/text-decoder/-/text-decoder-1.2.6.tgz","tarball":"http://registry.cnpm.dingdandao.com/text-decoder/download/text-decoder-1.2.6.tgz"},"_npmUser":{"name":"kasperisager","email":"kasperisager@hey.com"},"directories":{},"maintainers":[{"name":"mafintosh","email":""}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages-npm-production","tmp":"tmp/text-decoder_1.2.6_1771018087829_0.3002012872709128"},"_hasShrinkwrap":false,"_cnpmcore_publish_time":"2026-02-13T21:28:07.979Z","publish_time":1771018087979,"_source_registry_name":"default","_cnpm_publish_time":1771018087979},"1.2.5":{"name":"text-decoder","version":"1.2.5","description":"Streaming text decoder that preserves multibyte Unicode characters","main":"index.js","browser":{"./lib/pass-through-decoder.js":"./lib/browser-decoder.js","./lib/utf8-decoder.js":"./lib/browser-decoder.js"},"react-native":{"./lib/pass-through-decoder.js":"./lib/pass-through-decoder.js","./lib/utf8-decoder.js":"./lib/utf8-decoder.js"},"scripts":{"format":"prettier --write .","lint":"prettier --check . && lunte","test":"npm run test:node && npm run test:bare","test:node":"brittle-node test.js","test:bare":"brittle-bare test.js"},"repository":{"type":"git","url":"git+https://github.com/holepunchto/text-decoder.git"},"author":{"name":"Holepunch"},"license":"Apache-2.0","bugs":{"url":"https://github.com/holepunchto/text-decoder/issues"},"homepage":"https://github.com/holepunchto/text-decoder#readme","dependencies":{"b4a":"^1.6.4"},"devDependencies":{"brittle":"^3.3.2","lunte":"^1.3.0","prettier":"^3.6.2","prettier-config-holepunch":"^1.0.0"},"gitHead":"37f4e61a0ea51632d0ff3448060263e48d1243aa","_id":"text-decoder@1.2.5","_nodeVersion":"24.10.0","_npmVersion":"11.6.4","dist":{"shasum":"128e589d1baa43ddcc59eda35b46fd000fa79c22","size":6097,"noattachment":false,"key":"/text-decoder/-/text-decoder-1.2.5.tgz","tarball":"http://registry.cnpm.dingdandao.com/text-decoder/download/text-decoder-1.2.5.tgz"},"_npmUser":{"name":"kasperisager","email":"kasperisager@hey.com"},"directories":{},"maintainers":[{"name":"mafintosh","email":""}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages-npm-production","tmp":"tmp/text-decoder_1.2.5_1770997984217_0.12529734589264652"},"_hasShrinkwrap":false,"_cnpmcore_publish_time":"2026-02-13T15:53:04.435Z","publish_time":1770997984435,"_source_registry_name":"default","_cnpm_publish_time":1770997984435},"1.2.4":{"name":"text-decoder","version":"1.2.4","description":"Streaming text decoder that preserves multibyte Unicode characters","main":"index.js","browser":{"./lib/pass-through-decoder.js":"./lib/browser-decoder.js","./lib/utf8-decoder.js":"./lib/browser-decoder.js"},"react-native":{"./lib/pass-through-decoder.js":"./lib/pass-through-decoder.js","./lib/utf8-decoder.js":"./lib/utf8-decoder.js"},"scripts":{"format":"prettier --write .","lint":"prettier --check . && lunte","test":"npm run test:node && npm run test:bare","test:node":"brittle-node test.js","test:bare":"brittle-bare test.js"},"repository":{"type":"git","url":"git+https://github.com/holepunchto/text-decoder.git"},"author":{"name":"Holepunch"},"license":"Apache-2.0","bugs":{"url":"https://github.com/holepunchto/text-decoder/issues"},"homepage":"https://github.com/holepunchto/text-decoder#readme","dependencies":{"b4a":"^1.6.4"},"devDependencies":{"brittle":"^3.3.2","lunte":"^1.3.0","prettier":"^3.6.2","prettier-config-holepunch":"^1.0.0"},"gitHead":"e742731bd11d5a68b7dfbd00d695274208b40d1b","_id":"text-decoder@1.2.4","_nodeVersion":"24.10.0","_npmVersion":"11.6.4","dist":{"shasum":"ba17505b2efa3b44982c18be5ab58b1f52de053d","size":6098,"noattachment":false,"key":"/text-decoder/-/text-decoder-1.2.4.tgz","tarball":"http://registry.cnpm.dingdandao.com/text-decoder/download/text-decoder-1.2.4.tgz"},"_npmUser":{"name":"kasperisager","email":"kasperisager@hey.com"},"directories":{},"maintainers":[{"name":"mafintosh","email":""}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages-npm-production","tmp":"tmp/text-decoder_1.2.4_1770973172266_0.21879344825827274"},"_hasShrinkwrap":false,"_cnpmcore_publish_time":"2026-02-13T08:59:32.407Z","publish_time":1770973172407,"_source_registry_name":"default","_cnpm_publish_time":1770973172407},"1.2.3":{"name":"text-decoder","version":"1.2.3","description":"Streaming text decoder that preserves multibyte Unicode characters","main":"index.js","browser":{"./lib/pass-through-decoder.js":"./lib/browser-decoder.js","./lib/utf8-decoder.js":"./lib/browser-decoder.js"},"react-native":{"./lib/pass-through-decoder.js":"./lib/pass-through-decoder.js","./lib/utf8-decoder.js":"./lib/utf8-decoder.js"},"scripts":{"test":"standard && brittle test.js"},"repository":{"type":"git","url":"git+https://github.com/holepunchto/text-decoder.git"},"author":{"name":"Holepunch"},"license":"Apache-2.0","bugs":{"url":"https://github.com/holepunchto/text-decoder/issues"},"homepage":"https://github.com/holepunchto/text-decoder#readme","dependencies":{"b4a":"^1.6.4"},"devDependencies":{"brittle":"^3.3.2","standard":"^17.0.0"},"_id":"text-decoder@1.2.3","gitHead":"f8f535a663210b8bd7a0a43246fdd5d122dfd168","_nodeVersion":"23.3.0","_npmVersion":"10.9.0","dist":{"shasum":"b19da364d981b2326d5f43099c310cc80d770c65","size":6004,"noattachment":false,"key":"/text-decoder/-/text-decoder-1.2.3.tgz","tarball":"http://registry.cnpm.dingdandao.com/text-decoder/download/text-decoder-1.2.3.tgz"},"_npmUser":{"name":"kasperisager","email":"kasperisager@hey.com"},"directories":{},"maintainers":[{"name":"mafintosh","email":""}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages-npm-production","tmp":"tmp/text-decoder_1.2.3_1734160845377_0.49688375153232966"},"_hasShrinkwrap":false,"_cnpmcore_publish_time":"2024-12-14T07:20:45.554Z","publish_time":1734160845554,"_source_registry_name":"default","_cnpm_publish_time":1734160845554},"1.2.2":{"name":"text-decoder","version":"1.2.2","description":"Streaming text decoder that preserves multibyte Unicode characters","main":"index.js","browser":{"./lib/pass-through-decoder.js":"./lib/browser-decoder.js","./lib/utf8-decoder.js":"./lib/browser-decoder.js"},"scripts":{"test":"standard && brittle test.js"},"repository":{"type":"git","url":"git+https://github.com/holepunchto/text-decoder.git"},"author":{"name":"Holepunch"},"license":"Apache-2.0","bugs":{"url":"https://github.com/holepunchto/text-decoder/issues"},"homepage":"https://github.com/holepunchto/text-decoder#readme","dependencies":{"b4a":"^1.6.4"},"devDependencies":{"brittle":"^3.3.2","standard":"^17.0.0"},"_id":"text-decoder@1.2.2","gitHead":"edeed8439c04dd91dff314487049ab1aa1e1668f","_nodeVersion":"23.2.0","_npmVersion":"10.9.0","dist":{"shasum":"63dd2401c43895cecb292e2407db184b50ad60ac","size":5984,"noattachment":false,"key":"/text-decoder/-/text-decoder-1.2.2.tgz","tarball":"http://registry.cnpm.dingdandao.com/text-decoder/download/text-decoder-1.2.2.tgz"},"_npmUser":{"name":"kasperisager","email":"kasperisager@hey.com"},"directories":{},"maintainers":[{"name":"mafintosh","email":""}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/text-decoder_1.2.2_1733484232140_0.4695188321160044"},"_hasShrinkwrap":false,"_cnpmcore_publish_time":"2024-12-06T11:23:52.323Z","publish_time":1733484232323,"_source_registry_name":"default","_cnpm_publish_time":1733484232323},"1.2.1":{"name":"text-decoder","version":"1.2.1","description":"Streaming text decoder that preserves multibyte Unicode characters","main":"index.js","browser":{"./lib/pass-through-decoder.js":"./lib/browser-decoder.js","./lib/utf8-decoder.js":"./lib/browser-decoder.js"},"scripts":{"test":"standard && brittle test.js"},"repository":{"type":"git","url":"git+https://github.com/holepunchto/text-decoder.git"},"author":{"name":"Holepunch"},"license":"Apache-2.0","bugs":{"url":"https://github.com/holepunchto/text-decoder/issues"},"homepage":"https://github.com/holepunchto/text-decoder#readme","devDependencies":{"brittle":"^3.3.2","standard":"^17.0.0"},"_id":"text-decoder@1.2.1","gitHead":"f0372643d12e059481b0ee70e4794beb6734456e","_nodeVersion":"22.9.0","_npmVersion":"10.8.3","dist":{"shasum":"e173f5121d97bfa3ff8723429ad5ba92e1ead67e","size":5958,"noattachment":false,"key":"/text-decoder/-/text-decoder-1.2.1.tgz","tarball":"http://registry.cnpm.dingdandao.com/text-decoder/download/text-decoder-1.2.1.tgz"},"_npmUser":{"name":"kasperisager","email":"kasperisager@hey.com"},"directories":{},"maintainers":[{"name":"mafintosh","email":""}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/text-decoder_1.2.1_1729244445505_0.052335614547837306"},"_hasShrinkwrap":false,"_cnpmcore_publish_time":"2024-10-18T09:40:45.701Z","publish_time":1729244445701,"_source_registry_name":"default","_cnpm_publish_time":1729244445701},"1.2.0":{"name":"text-decoder","version":"1.2.0","description":"Streaming text decoder that preserves multibyte Unicode characters","main":"index.js","browser":{"./lib/pass-through-decoder.js":"./lib/browser-decoder.js","./lib/utf8-decoder.js":"./lib/browser-decoder.js"},"scripts":{"test":"standard && brittle test.js"},"repository":{"type":"git","url":"git+https://github.com/holepunchto/text-decoder.git"},"author":{"name":"Holepunch"},"license":"Apache-2.0","bugs":{"url":"https://github.com/holepunchto/text-decoder/issues"},"homepage":"https://github.com/holepunchto/text-decoder#readme","dependencies":{"b4a":"^1.6.4"},"devDependencies":{"brittle":"^3.3.2","standard":"^17.0.0"},"_id":"text-decoder@1.2.0","gitHead":"593ea993665fc4e18422e85685fd232b1a38579f","_nodeVersion":"20.17.0","_npmVersion":"10.8.3","dist":{"shasum":"85f19d4d5088e0b45cd841bdfaeac458dbffeefc","size":5960,"noattachment":false,"key":"/text-decoder/-/text-decoder-1.2.0.tgz","tarball":"http://registry.cnpm.dingdandao.com/text-decoder/download/text-decoder-1.2.0.tgz"},"_npmUser":{"name":"kasperisager","email":"kasperisager@hey.com"},"directories":{},"maintainers":[{"name":"mafintosh","email":""}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/text-decoder_1.2.0_1726140825855_0.24369847138853773"},"_hasShrinkwrap":false,"_cnpmcore_publish_time":"2024-09-12T11:33:46.010Z","publish_time":1726140826010,"_source_registry_name":"default","_cnpm_publish_time":1726140826010},"1.1.1":{"name":"text-decoder","version":"1.1.1","description":"Streaming text decoder that preserves multibyte Unicode characters","main":"index.js","browser":{"./lib/pass-through-decoder.js":"./lib/browser-decoder.js","./lib/utf8-decoder.js":"./lib/browser-decoder.js"},"scripts":{"test":"standard && brittle test.js"},"repository":{"type":"git","url":"git+https://github.com/holepunchto/text-decoder.git"},"author":{"name":"Holepunch"},"license":"Apache-2.0","bugs":{"url":"https://github.com/holepunchto/text-decoder/issues"},"homepage":"https://github.com/holepunchto/text-decoder#readme","dependencies":{"b4a":"^1.6.4"},"devDependencies":{"brittle":"^3.3.2","standard":"^17.0.0"},"_id":"text-decoder@1.1.1","gitHead":"be62bc0d500be6a61daca53367f79906ab4986b3","_nodeVersion":"22.3.0","_npmVersion":"10.8.1","dist":{"shasum":"5df9c224cebac4a7977720b9f083f9efa1aefde8","size":5942,"noattachment":false,"key":"/text-decoder/-/text-decoder-1.1.1.tgz","tarball":"http://registry.cnpm.dingdandao.com/text-decoder/download/text-decoder-1.1.1.tgz"},"_npmUser":{"name":"kasperisager","email":"kasperisager@hey.com"},"directories":{},"maintainers":[{"name":"mafintosh","email":""}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/text-decoder_1.1.1_1720426966587_0.06507570662669804"},"_hasShrinkwrap":false,"_cnpmcore_publish_time":"2024-07-08T08:22:46.734Z","publish_time":1720426966734,"_source_registry_name":"default","_cnpm_publish_time":1720426966734},"1.1.0":{"name":"text-decoder","version":"1.1.0","description":"Streaming text decoder that preserves multibyte Unicode characters","main":"index.js","scripts":{"test":"standard && brittle test.js"},"repository":{"type":"git","url":"git+https://github.com/holepunchto/text-decoder.git"},"author":{"name":"Holepunch"},"license":"Apache-2.0","bugs":{"url":"https://github.com/holepunchto/text-decoder/issues"},"homepage":"https://github.com/holepunchto/text-decoder#readme","dependencies":{"b4a":"^1.6.4"},"devDependencies":{"brittle":"^3.3.2","standard":"^17.0.0"},"_id":"text-decoder@1.1.0","gitHead":"97866f2af37a65b141ff4fa4da4cdc9a66f316f5","_nodeVersion":"21.7.3","_npmVersion":"10.5.0","dist":{"shasum":"3379e728fcf4d3893ec1aea35e8c2cac215ef190","size":5808,"noattachment":false,"key":"/text-decoder/-/text-decoder-1.1.0.tgz","tarball":"http://registry.cnpm.dingdandao.com/text-decoder/download/text-decoder-1.1.0.tgz"},"_npmUser":{"name":"kasperisager","email":"kasperisager@hey.com"},"directories":{},"maintainers":[{"name":"mafintosh","email":""}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/text-decoder_1.1.0_1714033673443_0.30746857192834876"},"_hasShrinkwrap":false,"_cnpmcore_publish_time":"2024-04-25T08:27:53.611Z","publish_time":1714033673611,"_source_registry_name":"default","_cnpm_publish_time":1714033673611},"1.0.1":{"name":"text-decoder","version":"1.0.1","description":"Streaming text decoder that preserves multibyte Unicode characters","main":"index.js","scripts":{"test":"standard && brittle test.js"},"repository":{"type":"git","url":"git+https://github.com/holepunchto/text-decoder.git"},"author":{"name":"Holepunch"},"license":"Apache-2.0","bugs":{"url":"https://github.com/holepunchto/text-decoder/issues"},"homepage":"https://github.com/holepunchto/text-decoder#readme","devDependencies":{"brittle":"^3.3.2","standard":"^17.0.0"},"gitHead":"1370bfd82dc3ddc63f6f130d1c6ccc31b36b07f4","_id":"text-decoder@1.0.1","_nodeVersion":"20.4.0","_npmVersion":"9.7.2","dist":{"shasum":"02276282748d0e0137cba8c1c6afbded24c20b45","size":5656,"noattachment":false,"key":"/text-decoder/-/text-decoder-1.0.1.tgz","tarball":"http://registry.cnpm.dingdandao.com/text-decoder/download/text-decoder-1.0.1.tgz"},"_npmUser":{"name":"kasperisager","email":"kasperisager@hey.com"},"directories":{},"maintainers":[{"name":"mafintosh","email":""}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/text-decoder_1.0.1_1692101876316_0.6355354566150824"},"_hasShrinkwrap":false,"_cnpmcore_publish_time":"2023-08-15T12:17:56.521Z","publish_time":1692101876521,"_source_registry_name":"default","_cnpm_publish_time":1692101876521},"1.0.0":{"name":"text-decoder","version":"1.0.0","description":"Streaming text decoder that preserves multibyte Unicode characters","main":"index.js","scripts":{"test":"standard && brittle test.js"},"repository":{"type":"git","url":"git+https://github.com/holepunchto/text-decoder.git"},"author":{"name":"Holepunch"},"license":"Apache-2.0","bugs":{"url":"https://github.com/holepunchto/text-decoder/issues"},"homepage":"https://github.com/holepunchto/text-decoder#readme","devDependencies":{"brittle":"^3.3.2","standard":"^17.0.0"},"gitHead":"aef37e21501dbd4332918e035f4d943d160b20a7","_id":"text-decoder@1.0.0","_nodeVersion":"20.4.0","_npmVersion":"9.7.2","dist":{"shasum":"c4e79ba83ec64900fb38544615625518a0807c12","size":5635,"noattachment":false,"key":"/text-decoder/-/text-decoder-1.0.0.tgz","tarball":"http://registry.cnpm.dingdandao.com/text-decoder/download/text-decoder-1.0.0.tgz"},"_npmUser":{"name":"kasperisager","email":"kasperisager@hey.com"},"directories":{},"maintainers":[{"name":"mafintosh","email":""}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/text-decoder_1.0.0_1692101584989_0.7204568813955017"},"_hasShrinkwrap":false,"_cnpmcore_publish_time":"2023-08-15T12:13:05.144Z","publish_time":1692101585144,"_source_registry_name":"default","_cnpm_publish_time":1692101585144}},"readme":"# text-decoder\n\nStreaming text decoder that preserves multibyte Unicode characters.\n\n```\nnpm i text-decoder\n```\n\n## Usage\n\n```js\nconst TextDecoder = require('text-decoder')\n\nconst td = new TextDecoder()\n\ntd.push(Buffer.of(0xf0, 0x9f, 0x92)) // returns ''\ntd.push(Buffer.of(0xa9)) // returns '????'\n```\n\n## API\n\n#### `const td = new TextDecoder([encoding])`\n\nCreate a text decoder. `encoding` defaults to `utf8`.\n\n#### `const string = td.push(data)`\n\nPush either a `Buffer` or a `string` to the text decoder. Returns the decoded string, buffering any partial data.\n\n#### `const string = td.end([data])`\n\nEnd the decoder, optionally pushing a final piece of data. Returns the decoded string.\n\n## License\n\nApache-2.0\n","_attachments":{},"homepage":"https://github.com/holepunchto/text-decoder#readme","bugs":{"url":"https://github.com/holepunchto/text-decoder/issues"},"license":"Apache-2.0"}