{"_id":"@cto.af/wtf8","_rev":"6-06f2b5462b82f5778df1cceeebcbb0a7","name":"@cto.af/wtf8","dist-tags":{"latest":"0.0.6"},"versions":{"0.0.1":{"name":"@cto.af/wtf8","version":"0.0.1","keywords":["utf8","wtf8","unicode","encode","decode","stream"],"author":{"name":"Joe Hildebrand","email":"joe-github@cursive.net"},"license":"MIT","_id":"@cto.af/wtf8@0.0.1","maintainers":[{"name":"hildjj","email":"joe-github@cursive.net"}],"homepage":"https://github.com/cto-af/wtf8#readme","bugs":{"url":"https://github.com/cto-af/wtf8/issues"},"dist":{"shasum":"53f9d242d7c2191364970b19324588698e952605","tarball":"https://registry.npmjs.org/@cto.af/wtf8/-/wtf8-0.0.1.tgz","fileCount":17,"integrity":"sha512-i7XkijS6WwohK14E7TPU4hW/6KVDCy3aIYLZxDnuMKzQknsLsSSmCoJWcHxlW6fCTz6dStwJb/qCtJI29F6cdQ==","signatures":[{"sig":"MEUCIDcV9tfehmTfzJyBgknf66KHRtjxaPcbrgzWRH5JV9XUAiEAsPiMX4pjFWd+KpYu499Kz7M6U0l0JAMrvV4msBRMnzk=","keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U"}],"attestations":{"url":"https://registry.npmjs.org/-/npm/v1/attestations/@cto.af%2fwtf8@0.0.1","provenance":{"predicateType":"https://slsa.dev/provenance/v1"}},"unpackedSize":16315},"main":"lib/index.js","type":"module","types":"./lib/index.d.ts","engines":{"node":">=20"},"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"}},"gitHead":"dbbe610f29048de6bbd29951533ad7395c4f7ecf","_npmUser":{"name":"hildjj","email":"joe-github@cursive.net"},"decription":"Encode and decode WTF8 like TextEncoder and TextDecoder","repository":{"url":"git+https://github.com/cto-af/wtf8.git","type":"git"},"_npmVersion":"10.9.2","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":"22.14.0","_hasShrinkwrap":false,"packageManager":"pnpm@10.10.0","_npmOperationalInternal":{"tmp":"tmp/wtf8_0.0.1_1745947836398_0.9999772654060894","host":"s3://npm-registry-packages-npm-production"}},"0.0.2":{"name":"@cto.af/wtf8","version":"0.0.2","keywords":["utf8","wtf8","unicode","encode","decode","stream"],"author":{"name":"Joe Hildebrand","email":"joe-github@cursive.net"},"license":"MIT","_id":"@cto.af/wtf8@0.0.2","maintainers":[{"name":"hildjj","email":"joe-github@cursive.net"}],"homepage":"https://github.com/cto-af/wtf8#readme","bugs":{"url":"https://github.com/cto-af/wtf8/issues"},"dist":{"shasum":"0035df6e25eaadccd4c6289c91f5c373d20a402f","tarball":"https://registry.npmjs.org/@cto.af/wtf8/-/wtf8-0.0.2.tgz","fileCount":17,"integrity":"sha512-ATm4UQiKrdm5GnU6BvIwUDN+LDEtt23zuzKFpnfDT59ULAd0aMYm/nSFzbSO02garLcXumRC13PzNfa7BsfvSg==","signatures":[{"sig":"MEUCIHnDLXzSMxYXnb9AKNCfq9Gij3NRqEk40cpQKP+rfwRRAiEAx7cLl51Z2YF7ueMRktgpZJXZm3d3GyUJGhoKRJWJYhI=","keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U"}],"attestations":{"url":"https://registry.npmjs.org/-/npm/v1/attestations/@cto.af%2fwtf8@0.0.2","provenance":{"predicateType":"https://slsa.dev/provenance/v1"}},"unpackedSize":16824},"main":"lib/index.js","type":"module","types":"./lib/index.d.ts","engines":{"node":">=20"},"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"}},"gitHead":"da3a1c6acbc3a91e7082da31e2d856686a697b2b","_npmUser":{"name":"hildjj","email":"joe-github@cursive.net"},"decription":"Encode and decode WTF8 like TextEncoder and TextDecoder","repository":{"url":"git+https://github.com/cto-af/wtf8.git","type":"git"},"_npmVersion":"10.9.2","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":"22.14.0","_hasShrinkwrap":false,"packageManager":"pnpm@10.10.0","_npmOperationalInternal":{"tmp":"tmp/wtf8_0.0.2_1745958773071_0.09219371051240866","host":"s3://npm-registry-packages-npm-production"}},"0.0.3":{"name":"@cto.af/wtf8","version":"0.0.3","keywords":["utf8","wtf8","unicode","encode","decode","stream"],"author":{"name":"Joe Hildebrand","email":"joe-github@cursive.net"},"license":"MIT","_id":"@cto.af/wtf8@0.0.3","maintainers":[{"name":"hildjj","email":"joe-github@cursive.net"}],"homepage":"https://github.com/cto-af/wtf8#readme","bugs":{"url":"https://github.com/cto-af/wtf8/issues"},"dist":{"shasum":"c6353ec0b567fa6724dfbfda9a0db648f176e1dc","tarball":"https://registry.npmjs.org/@cto.af/wtf8/-/wtf8-0.0.3.tgz","fileCount":17,"integrity":"sha512-9JozdA3YMRzbWiB7GEFJVIdMzHmm3lh1nnV73aUAADutgO/HLMxmsuMakisE+WIoS7SUFSp4B088udF2cBWTiQ==","signatures":[{"sig":"MEUCIC3hW2WgNN4d8lpd6N22mmUPdx5OSVAysE7iaHJU1Dp5AiEA6vuP+DdZUP83qfbz0gLHMK1bCWSbcEzF0KRM2xrugE4=","keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U"}],"attestations":{"url":"https://registry.npmjs.org/-/npm/v1/attestations/@cto.af%2fwtf8@0.0.3","provenance":{"predicateType":"https://slsa.dev/provenance/v1"}},"unpackedSize":16824},"main":"lib/index.js","type":"module","types":"./lib/index.d.ts","engines":{"node":">=20"},"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"}},"gitHead":"ba478e5d6789d6067e6ba6930d7ef5b42097c4a8","_npmUser":{"name":"hildjj","actor":{"name":"hildjj","type":"user","email":"joe-github@cursive.net"},"email":"joe-github@cursive.net"},"decription":"Encode and decode WTF8 like TextEncoder and TextDecoder","repository":{"url":"git+https://github.com/cto-af/wtf8.git","type":"git"},"_npmVersion":"10.9.2","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":"22.16.0","_hasShrinkwrap":false,"packageManager":"pnpm@10.12.1","_npmOperationalInternal":{"tmp":"tmp/wtf8_0.0.3_1750519046333_0.2174799814606707","host":"s3://npm-registry-packages-npm-production"}},"0.0.4":{"name":"@cto.af/wtf8","version":"0.0.4","keywords":["utf8","wtf8","unicode","encode","decode","stream"],"author":{"name":"Joe Hildebrand","email":"joe-github@cursive.net"},"license":"MIT","_id":"@cto.af/wtf8@0.0.4","maintainers":[{"name":"hildjj","email":"joe-github@cursive.net"}],"homepage":"https://github.com/cto-af/wtf8#readme","bugs":{"url":"https://github.com/cto-af/wtf8/issues"},"dist":{"shasum":"44b3a1c0f07e97032c712511a5a9e8c03c6ced58","tarball":"https://registry.npmjs.org/@cto.af/wtf8/-/wtf8-0.0.4.tgz","fileCount":17,"integrity":"sha512-GbVy/i3DNrlp6klsqA7MatSERqp338xeWdMDHSGMxUKE19hC2Yk2dydLL0LtNC9Kjbb5bXbdwHHKa/mtnIRTZw==","signatures":[{"sig":"MEUCIC3z0CqQrrYBhhPLRpv0MzUxlGUQVcZKqUnDaysudCk+AiEAg2BbcnYp3y/jDk0tMjAxFSl2blKJWo9SKPBzmLQxYyQ=","keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U"}],"attestations":{"url":"https://registry.npmjs.org/-/npm/v1/attestations/@cto.af%2fwtf8@0.0.4","provenance":{"predicateType":"https://slsa.dev/provenance/v1"}},"unpackedSize":16824},"main":"lib/index.js","type":"module","types":"./lib/index.d.ts","engines":{"node":">=20"},"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"}},"gitHead":"0c21e63d5a4c89e3ce41e61f4b3b7b74637d392a","_npmUser":{"name":"hildjj","email":"joe-github@cursive.net"},"decription":"Encode and decode WTF8 like TextEncoder and TextDecoder","repository":{"url":"git+https://github.com/cto-af/wtf8.git","type":"git"},"_npmVersion":"10.9.2","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":"22.17.1","_hasShrinkwrap":false,"packageManager":"pnpm@10.14.0","_npmOperationalInternal":{"tmp":"tmp/wtf8_0.0.4_1754167596609_0.21502913309456706","host":"s3://npm-registry-packages-npm-production"}},"0.0.5":{"name":"@cto.af/wtf8","version":"0.0.5","keywords":["utf8","wtf8","unicode","encode","decode","stream"],"author":{"name":"Joe Hildebrand","email":"joe-github@cursive.net"},"license":"MIT","_id":"@cto.af/wtf8@0.0.5","maintainers":[{"name":"hildjj","email":"joe-github@cursive.net"}],"homepage":"https://github.com/cto-af/wtf8#readme","bugs":{"url":"https://github.com/cto-af/wtf8/issues"},"dist":{"shasum":"968ab98ca2036c7d104e95b449e782dbf0c4a80f","tarball":"https://registry.npmjs.org/@cto.af/wtf8/-/wtf8-0.0.5.tgz","fileCount":17,"integrity":"sha512-LfUFi+Vv4eDzj+XAtR89e3wwjXA/NZjUSwU5NhwbBrLecxPaBYFy3exCuc1j+D4UZeOVdqlsl8G7LmOt18V0tg==","signatures":[{"sig":"MEYCIQDfqMklnmpMe0xrFAs1HV4rdGTAgED7TarN2dV9xm2HHgIhANsYcqlSoLZGqnxprzLMuncyQ1ooOHLzwQKYE3kC7JDn","keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U"}],"attestations":{"url":"https://registry.npmjs.org/-/npm/v1/attestations/@cto.af%2fwtf8@0.0.5","provenance":{"predicateType":"https://slsa.dev/provenance/v1"}},"unpackedSize":16936},"main":"lib/index.js","type":"module","types":"./lib/index.d.ts","engines":{"node":">=20"},"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"}},"gitHead":"8096a220a129fee1d15629435eda5ae446550114","_npmUser":{"name":"GitHub Actions","email":"npm-oidc-no-reply@github.com","trustedPublisher":{"id":"github","oidcConfigId":"oidc:0ce1d0e5-93fc-41f1-89ad-c63468239a93"}},"decription":"Encode and decode WTF8 like TextEncoder and TextDecoder","repository":{"url":"git+https://github.com/cto-af/wtf8.git","type":"git"},"_npmVersion":"11.8.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.13.1","_hasShrinkwrap":false,"packageManager":"pnpm@10.30.3","_npmOperationalInternal":{"tmp":"tmp/wtf8_0.0.5_1772552577444_0.6134191218540708","host":"s3://npm-registry-packages-npm-production"}},"0.0.6":{"_id":"@cto.af/wtf8@0.0.6","bugs":{"url":"https://github.com/cto-af/wtf8/issues"},"dist":{"shasum":"f0ab000e427b5d2fa6c71e42bf4eb93d1e8ac268","tarball":"https://registry.npmjs.org/@cto.af/wtf8/-/wtf8-0.0.6.tgz","fileCount":17,"integrity":"sha512-xp/zbWLXuh2WBxi9tIc+Jep7BAwLu8ETTI8xN68ks10bxOBMISs/jcu9DBEkOeGXLaTKUbA0Y2Ficx/jmmPABg==","signatures":[{"sig":"MEUCIQDitPD5zqspIIMbRC/zYHwJoCuq5Xrmn6DHiKOWgQNTnwIgGNUy+eHeDs64gqsKqnzSzvKoBwEvvbbXZTGEyKTotDo=","keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U"},{"keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U","sig":"MEUCICnDFMiErof6XAdszyrUpiTsY92Jxrwk+g6TCnCapDyKAiEArZV6FnplEJHaVWzcA+5LGYV/96OT/2EPSKbIwxMfoWM="}],"attestations":{"url":"https://registry.npmjs.org/-/npm/v1/attestations/@cto.af%2fwtf8@0.0.6","provenance":{"predicateType":"https://slsa.dev/provenance/v1"}},"unpackedSize":16935},"main":"lib/index.js","name":"@cto.af/wtf8","type":"module","types":"./lib/index.d.ts","author":{"name":"Joe Hildebrand","email":"joe-github@cursive.net"},"engines":{"node":">=20"},"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"}},"gitHead":"dad649f0a2c4b06c1d95f7e55be7f982d9fc8895","license":"MIT","version":"0.0.6","_npmUser":{"name":"GitHub Actions","email":"npm-oidc-no-reply@github.com","trustedPublisher":{"id":"github","oidcConfigId":"oidc:0ce1d0e5-93fc-41f1-89ad-c63468239a93"}},"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":"git+https://github.com/cto-af/wtf8.git","type":"git"},"_npmVersion":"11.19.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":"hildjj","email":"joe-github@cursive.net"}],"_nodeVersion":"24.21.0","_hasShrinkwrap":false,"packageManager":"pnpm@12.5.1","_npmOperationalInternal":{"host":"s3://npm-registry-packages-npm-production","tmp":"tmp/wtf8_0.0.6_1790491337978_0.8557624086026443"}}},"time":{"created":"2025-04-29T17:30:36.295Z","modified":"2026-09-27T06:42:18.639Z","0.0.1":"2025-04-29T17:30:36.572Z","0.0.2":"2025-04-29T20:32:53.234Z","0.0.3":"2025-06-21T15:17:26.545Z","0.0.4":"2025-08-02T20:46:36.803Z","0.0.5":"2026-03-03T15:42:57.614Z","0.0.6":"2026-09-27T06:42:18.265Z"},"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":"git+https://github.com/cto-af/wtf8.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":"hildjj","email":"joe-github@cursive.net"}],"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","readmeFilename":"README.md"}