{"_id":"@cjser/cto.af__wtf8","_rev":"2-0bfc5a5229d1735c47fc3359bb1e6a16","name":"@cjser/cto.af__wtf8","dist-tags":{"latest":"0.0.6-cjser.2"},"versions":{"0.0.5-cjser.2":{"name":"@cjser/cto.af__wtf8","version":"0.0.5-cjser.2","keywords":["utf8","wtf8","unicode","encode","decode","stream"],"author":{"name":"Joe Hildebrand","email":"joe-github@cursive.net"},"license":"MIT","_id":"@cjser/cto.af__wtf8@0.0.5-cjser.2","maintainers":[{"name":"nanahira","email":"nanahira@momobako.com"}],"homepage":"https://github.com/cto-af/wtf8#readme","bugs":{"url":"https://github.com/cto-af/wtf8/issues"},"dist":{"shasum":"9ba51f735111487e5028bf89d573b8e45b4a5de7","tarball":"https://registry.npmjs.org/@cjser/cto.af__wtf8/-/cto.af__wtf8-0.0.5-cjser.2.tgz","fileCount":22,"integrity":"sha512-m1Y50WPLEnrTQELpBN0rilMtWw40x8A+RdGg5RfbkHnveZ+ViloFkb2jLjHxf/RPVaKVPmFoajbpCldbMqpQqw==","signatures":[{"sig":"MEUCIFo/aD9OKhZ526b4HeYQDsymtUjyVq8MtQKzrCJkSItmAiEA37Onh1ug0Ess0ny7VwfM3UUB0IB7yQ2/DldBjHR3WNA=","keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U"}],"unpackedSize":48813},"main":"./dist-cjser/index.cjs","type":"module","cjser":{"original":{"main":"lib/index.js","name":"@cto.af/wtf8","files":["lib/*"],"exports":{".":{"default":"./lib/index.js"},"./decode":{"default":"./lib/decode.js"},"./encode":{"default":"./lib/encode.js"},"./decodeStream":{"default":"./lib/decodeStream.js"},"./encodeStream":{"default":"./lib/encodeStream.js"}},"version":"0.0.5","repository":{"url":"git+https://github.com/cto-af/wtf8.git","type":"git"}},"cjserVersion":2,"sourceVersion":"0.0.5"},"engines":{"node":">=20"},"exports":{".":{"default":"./lib/index.js","require":"./dist-cjser/index.cjs"},"./decode":{"default":"./lib/decode.js","require":"./dist-cjser/decode.cjs"},"./encode":{"default":"./lib/encode.js","require":"./dist-cjser/encode.cjs"},"./decodeStream":{"default":"./lib/decodeStream.js","require":"./dist-cjser/decodeStream.cjs"},"./encodeStream":{"default":"./lib/encodeStream.js","require":"./dist-cjser/encodeStream.cjs"}},"gitHead":"a4bef54d7d22d3d9a6b84528457938d84cd65fe7","_npmUser":{"name":"nanahira","email":"nanahira@momobako.com"},"decription":"Encode and decode WTF8 like TextEncoder and TextDecoder","repository":{"url":"https://code.moenext.com/3rdeye/cjser.git","type":"git"},"_npmVersion":"11.9.0","description":"Encode and decode [WTF-8](https://simonsapin.github.io/wtf-8/) with a similar API to [TextEncoder](https://developer.mozilla.org/en-US/docs/Web/API/TextEncoder) and [TextDecoder](https://developer.mozilla.org/en-US/docs/Web/API/TextDecoder).","directories":{},"_nodeVersion":"24.14.0","_hasShrinkwrap":false,"packageManager":"pnpm@10.30.3","_npmOperationalInternal":{"tmp":"tmp/cto.af__wtf8_0.0.5-cjser.2_1779123265682_0.3210609051880815","host":"s3://npm-registry-packages-npm-production"}},"0.0.6-cjser.2":{"_id":"@cjser/cto.af__wtf8@0.0.6-cjser.2","bugs":{"url":"https://github.com/cto-af/wtf8/issues"},"dist":{"shasum":"b8ca75e6706d1a8574558e37ce1126eeb5cf0480","tarball":"https://registry.npmjs.org/@cjser/cto.af__wtf8/-/cto.af__wtf8-0.0.6-cjser.2.tgz","fileCount":22,"integrity":"sha512-XKY9doAP33luYz1+lqAF0nap2BNYMQpEq/RaUVEi+cj3MoKYMAyMI4pkSy7xsWEk3wvWHSIYg19eyZRf0h8HPQ==","signatures":[{"sig":"MEUCIAF31AhdN0Zu9pbq5hDAO0NfMfSrAy+VP8r7Sf6ljanrAiEAkWoyBZcaCEnNtimxspZpHNcmz7Knaww0UKPG6NOa+Wc=","keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U"},{"keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U","sig":"MEUCICsjWBGTnqwSAA3WHnSffVdBmXfXvz8ySZWoeJrtkGOjAiEAxC7t2/JNRbUmAo9RqFVsDUMNNEgPSPhstpC6cWAU0vA="}],"unpackedSize":48812},"main":"./dist-cjser/index.cjs","name":"@cjser/cto.af__wtf8","type":"module","cjser":{"original":{"main":"lib/index.js","name":"@cto.af/wtf8","files":["lib/*"],"exports":{".":{"default":"./lib/index.js"},"./decode":{"default":"./lib/decode.js"},"./encode":{"default":"./lib/encode.js"},"./decodeStream":{"default":"./lib/decodeStream.js"},"./encodeStream":{"default":"./lib/encodeStream.js"}},"version":"0.0.6","repository":{"url":"git+https://github.com/cto-af/wtf8.git","type":"git"}},"cjserVersion":2,"sourceVersion":"0.0.6"},"author":{"name":"Joe Hildebrand","email":"joe-github@cursive.net"},"engines":{"node":">=20"},"exports":{".":{"default":"./lib/index.js","require":"./dist-cjser/index.cjs"},"./decode":{"default":"./lib/decode.js","require":"./dist-cjser/decode.cjs"},"./encode":{"default":"./lib/encode.js","require":"./dist-cjser/encode.cjs"},"./decodeStream":{"default":"./lib/decodeStream.js","require":"./dist-cjser/decodeStream.cjs"},"./encodeStream":{"default":"./lib/encodeStream.js","require":"./dist-cjser/encodeStream.cjs"}},"gitHead":"a4bef54d7d22d3d9a6b84528457938d84cd65fe7","license":"MIT","version":"0.0.6-cjser.2","_npmUser":{"name":"nanahira","email":"nanahira@momobako.com"},"homepage":"https://github.com/cto-af/wtf8#readme","keywords":["utf8","wtf8","unicode","encode","decode","stream"],"decription":"Encode and decode WTF8 like TextEncoder and TextDecoder","repository":{"url":"https://code.moenext.com/3rdeye/cjser.git","type":"git"},"_npmVersion":"10.7.0","description":"Encode and decode [WTF-8](https://simonsapin.github.io/wtf-8/) with a similar API to [TextEncoder](https://developer.mozilla.org/en-US/docs/Web/API/TextEncoder) and [TextDecoder](https://developer.mozilla.org/en-US/docs/Web/API/TextDecoder).","directories":{},"maintainers":[{"name":"nanahira","email":"nanahira@momobako.com"}],"_nodeVersion":"20.14.0","_hasShrinkwrap":false,"packageManager":"pnpm@12.5.1","_npmOperationalInternal":{"host":"s3://npm-registry-packages-npm-production","tmp":"tmp/cto.af__wtf8_0.0.6-cjser.2_1790963017090_0.29414254494800884"}}},"time":{"created":"2026-05-18T16:54:25.606Z","modified":"2026-10-02T17:43:37.352Z","0.0.5-cjser.2":"2026-05-18T16:54:25.844Z","0.0.6-cjser.2":"2026-10-02T17:43:37.188Z"},"bugs":{"url":"https://github.com/cto-af/wtf8/issues"},"author":{"name":"Joe Hildebrand","email":"joe-github@cursive.net"},"license":"MIT","homepage":"https://github.com/cto-af/wtf8#readme","keywords":["utf8","wtf8","unicode","encode","decode","stream"],"repository":{"url":"https://code.moenext.com/3rdeye/cjser.git","type":"git"},"description":"Encode and decode [WTF-8](https://simonsapin.github.io/wtf-8/) with a similar API to [TextEncoder](https://developer.mozilla.org/en-US/docs/Web/API/TextEncoder) and [TextDecoder](https://developer.mozilla.org/en-US/docs/Web/API/TextDecoder).","maintainers":[{"name":"nanahira","email":"nanahira@momobako.com"}],"readme":"# @cto.af/wtf8\n\nEncode and decode [WTF-8](https://simonsapin.github.io/wtf-8/) with a similar\nAPI to\n[TextEncoder](https://developer.mozilla.org/en-US/docs/Web/API/TextEncoder)\nand\n[TextDecoder](https://developer.mozilla.org/en-US/docs/Web/API/TextDecoder).\n\nThe goal is to be able to parse and generate bytestreams that can store any\nJavaScript string, including ones that have unpaired surrogates.\n\n## Installation\n\n```sh\nnpm install @cto.af/wtf8\n```\n\n## API\n\nFull [API documentation](http://cto-af.github.io/wtf8/) is available.\n\nExample:\n\n```js\nimport {Wtf8Decoder, Wtf8Encoder} from '@cto.af/wtf8';\n\nconst bytes = new Wtf8Encoder().encode('\\ud800');\nconst string = new Wtf8Decoder().decode(bytes); // '\\ud800'\n```\n\nW3C streams are also provided: `Wtf8EncoderStream` and `Wtf8DecoderStream`.\n\n## Notes\n\nUsed a few of the tricks from the paper\n[Validating UTF-8 In Less Than One Instruction Per Byte](https://arxiv.org/pdf/2010.03090),\nbut not all of them.  Moving data in and out of WASM to be able to use SIMD\nmight be slightly faster, but since we're not merely validating but instead\nactually decoding (and generating replacement characters when fatal is false),\nstaying in JS seems good enough for the moment.\n\n---\n[![Build Status](https://github.com/cto-af/wtf8/workflows/Tests/badge.svg)](https://github.com/cto-af/wtf8/actions?query=workflow%3ATests)\n[![codecov](https://codecov.io/gh/cto-af/wtf8/branch/main/graph/badge.svg?token=N7B7YLIDM4)](https://codecov.io/gh/cto-af/wtf8)\n\n## cjser\n\nThis package is a CommonJS-compatible build generated by cjser for projects that still need `require()` support. The source version matches the original npm package version, with a cjser prerelease suffix for this generated build.\nOriginal repository: https://github.com/cto-af/wtf8\n","readmeFilename":"README.md"}