{"name":"text-decoder","version":"1.2.7","author":{"name":"Holepunch"},"license":"Apache-2.0","_id":"text-decoder@1.2.7","maintainers":[{"name":"mafintosh","email":"mathiasbuus@gmail.com"},{"name":"kasperisager","email":"kasperisager@hey.com"}],"homepage":"https://github.com/holepunchto/text-decoder#readme","bugs":{"url":"https://github.com/holepunchto/text-decoder/issues"},"dist":{"shasum":"5d073a9a74b9c0a9d28dfadcab96b604af57d8ba","tarball":"http://registry-npm.ywwl.com/text-decoder/download/text-decoder-1.2.7.tgz","fileCount":6,"integrity":"sha512-vlLytXkeP4xvEq2otHeJfSQIRyWxo/oZGEbXrtEEF9Hnmrdly59sUbzZ/QgyWuLYHctCHxFF4tRQZNQ9k60ExQ==","signatures":[{"sig":"MEUCIQD8936h6nkw/0HgGGG1xLIxUhfpC75EBBI8QulbIbHcqgIgaW+qPIJm3cp1otxmH0GK9Qg4Ke22VT+vz1aaXe9av0E=","keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U"}],"unpackedSize":19130,"size":6277,"noattachment":false,"key":"/text-decoder/-/text-decoder-1.2.7.tgz"},"exports":{".":"./index.js","./package":"./package.json"},"gitHead":"7d61ece8d9f89788b7a209125ada4b0209038a9f","scripts":{"lint":"prettier --check . && lunte","test":"npm run test:node && npm run test:bare","format":"prettier --write .","test:bare":"brittle-bare test.js","test:node":"brittle-node test.js"},"_npmUser":{"name":"kasperisager","email":"kasperisager@hey.com"},"repository":{"url":"git+https://github.com/holepunchto/text-decoder.git","type":"git"},"_npmVersion":"11.6.4","description":"Streaming text decoder that preserves multibyte Unicode characters","directories":{},"_nodeVersion":"24.10.0","dependencies":{"b4a":"^1.6.4"},"_hasShrinkwrap":false,"devDependencies":{"lunte":"^1.3.0","brittle":"^3.3.2","prettier":"^3.6.2","prettier-config-holepunch":"^1.0.0"},"_npmOperationalInternal":{"tmp":"tmp/text-decoder_1.2.7_1771237259473_0.946208210801762","host":"s3://npm-registry-packages-npm-production"},"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","publish_time":1771237259609,"_cnpm_publish_time":1771237259609,"dist-tags":{"latest":"1.2.7"}}