{"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":{"integrity":"sha512-3/o9z3X0X0fTupwsYvR03pJ/DjWuqqrfwBgTQzdWDiQSm9KitAyz/9WqsT2JQW7KV2m+bC2ol/zqpW37NHxLaA==","shasum":"b19da364d981b2326d5f43099c310cc80d770c65","tarball":"http://registry-npm.ywwl.com/text-decoder/download/text-decoder-1.2.3.tgz","fileCount":7,"unpackedSize":17581,"signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCICtfEYqZ7OqXnI2saES2/j3+LwV05k42IkHmAopXqw9bAiEAroH41uSs6qjNg0A95522N6J1gdKMT5NaOI6l5C3xujc="}],"size":6004,"noattachment":false,"key":"/text-decoder/-/text-decoder-1.2.3.tgz"},"_npmUser":{"name":"kasperisager","email":"kasperisager@hey.com"},"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages-npm-production","tmp":"tmp/text-decoder_1.2.3_1734160845377_0.49688375153232966"},"_hasShrinkwrap":false,"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":1734160845554,"maintainers":[{"name":"mafintosh","email":"mathiasbuus@gmail.com"},{"name":"kasperisager","email":"kasperisager@hey.com"}],"_cnpm_publish_time":1734160845554,"dist-tags":{"latest":"1.2.7"}}