{"_id":"@cto.af/wtf8","_rev":"1667267","name":"@cto.af/wtf8","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).","dist-tags":{"latest":"1.0.0"},"maintainers":[{"name":"hildjj","email":"joe-github@cursive.net"}],"time":{"modified":"2026-11-03T09:10:02.000Z","created":"2025-04-29T17:30:36.572Z","1.0.0":"2026-10-25T21:22:45.066Z","0.0.6":"2026-09-27T06:42:18.265Z","0.0.5":"2026-03-03T15:42:57.614Z","0.0.4":"2025-08-02T20:46:36.803Z","0.0.3":"2025-06-21T15:17:26.545Z","0.0.2":"2025-04-29T20:32:53.234Z","0.0.1":"2025-04-29T17:30:36.572Z"},"users":{},"author":{"name":"Joe Hildebrand","email":"joe-github@cursive.net"},"repository":{"url":"git+https://github.com/cto-af/wtf8.git","type":"git"},"versions":{"1.0.0":{"_id":"@cto.af/wtf8@1.0.0","bugs":{"url":"https://github.com/cto-af/wtf8/issues"},"dist":{"shasum":"bd12553631f1a332dc874fed1ebd21af15bb3dad","tarball":"http://registry-npm.ywwl.com/@cto.af/wtf8/download/@cto.af/wtf8-1.0.0.tgz","fileCount":17,"integrity":"sha512-qI0XnZxcj/FmASB8XXWqG49bSIzu0I/02deAjhnTni9IZ7KMRVlh8EFLE+mmJlMA169lET6rTCFhEsZSjOwlhA==","signatures":[{"sig":"MEYCIQD2FOeaeI91I3IVfvx17diOm/ZHwlWcyZINRtK+g0qY+wIhAIVFB3CZ2+Ns9/PHzjiUFqneWaG1nJ9h/xFDHtT4J+XY","keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U"},{"keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U","sig":"MEQCIFW+yNi/Q1sD8TyAOodG4UYK9HaVz3TKE/h0rNi6E9p7AiAR+zLRj2Ez1EJfEiooMihxCzmdsLIjaxLCe20Rl8QxGA=="}],"attestations":{"url":"https://registry.npmjs.org/-/npm/v1/attestations/@cto.af%2fwtf8@1.0.0","provenance":{"predicateType":"https://slsa.dev/provenance/v1"}},"unpackedSize":16936,"size":5056,"noattachment":false,"key":"/@cto.af/wtf8/-/@cto.af/wtf8-1.0.0.tgz"},"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":">=22"},"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":"3296275c17187d91305f039d083f754d0c6d531f","license":"MIT","version":"1.0.0","_npmUser":{"name":"GitHub Actions","email":"npm-oidc-no-reply@github.com","trustedPublisher":{"id":"github","oidcConfigId":"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.20.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":"26.12.1","_hasShrinkwrap":false,"packageManager":"pnpm@12.14.0","_npmOperationalInternal":{"host":"s3://npm-registry-packages-npm-production","tmp":"tmp/wtf8_1.0.0_1792963364984_0.4891666493756257"},"publish_time":1792963365066,"_cnpm_publish_time":1792963365066},"0.0.6":{"name":"@cto.af/wtf8","version":"0.0.6","keywords":["utf8","wtf8","unicode","encode","decode","stream"],"author":{"name":"Joe Hildebrand","email":"joe-github@cursive.net"},"license":"MIT","_id":"@cto.af/wtf8@0.0.6","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":"f0ab000e427b5d2fa6c71e42bf4eb93d1e8ac268","tarball":"http://registry-npm.ywwl.com/@cto.af/wtf8/download/@cto.af/wtf8-0.0.6.tgz","fileCount":17,"integrity":"sha512-xp/zbWLXuh2WBxi9tIc+Jep7BAwLu8ETTI8xN68ks10bxOBMISs/jcu9DBEkOeGXLaTKUbA0Y2Ficx/jmmPABg==","signatures":[{"sig":"MEUCIQDitPD5zqspIIMbRC/zYHwJoCuq5Xrmn6DHiKOWgQNTnwIgGNUy+eHeDs64gqsKqnzSzvKoBwEvvbbXZTGEyKTotDo=","keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U"},{"sig":"MEUCICnDFMiErof6XAdszyrUpiTsY92Jxrwk+g6TCnCapDyKAiEArZV6FnplEJHaVWzcA+5LGYV/96OT/2EPSKbIwxMfoWM=","keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U"}],"attestations":{"url":"https://registry.npmjs.org/-/npm/v1/attestations/@cto.af%2fwtf8@0.0.6","provenance":{"predicateType":"https://slsa.dev/provenance/v1"}},"unpackedSize":16935,"size":5056,"noattachment":false,"key":"/@cto.af/wtf8/-/@cto.af/wtf8-0.0.6.tgz"},"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":"dad649f0a2c4b06c1d95f7e55be7f982d9fc8895","_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.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":{},"_nodeVersion":"24.21.0","_hasShrinkwrap":false,"packageManager":"pnpm@12.5.1","_npmOperationalInternal":{"tmp":"tmp/wtf8_0.0.6_1790491337978_0.8557624086026443","host":"s3://npm-registry-packages-npm-production"},"publish_time":1790491338265,"_cnpm_publish_time":1790491338265},"0.0.5":{"name":"@cto.af/wtf8","version":"0.0.5","decription":"Encode and decode WTF8 like TextEncoder and TextDecoder","main":"lib/index.js","type":"module","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"}},"keywords":["utf8","wtf8","unicode","encode","decode","stream"],"author":{"name":"Joe Hildebrand","email":"joe-github@cursive.net"},"license":"MIT","repository":{"type":"git","url":"git+https://github.com/cto-af/wtf8.git"},"homepage":"https://github.com/cto-af/wtf8#readme","bugs":{"url":"https://github.com/cto-af/wtf8/issues"},"packageManager":"pnpm@10.30.3","engines":{"node":">=20"},"gitHead":"8096a220a129fee1d15629435eda5ae446550114","types":"./lib/index.d.ts","_id":"@cto.af/wtf8@0.0.5","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).","_nodeVersion":"24.13.1","_npmVersion":"11.8.0","dist":{"integrity":"sha512-LfUFi+Vv4eDzj+XAtR89e3wwjXA/NZjUSwU5NhwbBrLecxPaBYFy3exCuc1j+D4UZeOVdqlsl8G7LmOt18V0tg==","shasum":"968ab98ca2036c7d104e95b449e782dbf0c4a80f","tarball":"http://registry-npm.ywwl.com/@cto.af/wtf8/download/@cto.af/wtf8-0.0.5.tgz","fileCount":17,"unpackedSize":16936,"attestations":{"url":"https://registry.npmjs.org/-/npm/v1/attestations/@cto.af%2fwtf8@0.0.5","provenance":{"predicateType":"https://slsa.dev/provenance/v1"}},"signatures":[{"keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U","sig":"MEYCIQDfqMklnmpMe0xrFAs1HV4rdGTAgED7TarN2dV9xm2HHgIhANsYcqlSoLZGqnxprzLMuncyQ1ooOHLzwQKYE3kC7JDn"}],"size":5057,"noattachment":false,"key":"/@cto.af/wtf8/-/@cto.af/wtf8-0.0.5.tgz"},"_npmUser":{"name":"GitHub Actions","email":"npm-oidc-no-reply@github.com","trustedPublisher":{"id":"github","oidcConfigId":"oidc:0ce1d0e5-93fc-41f1-89ad-c63468239a93"}},"directories":{},"maintainers":[{"name":"hildjj","email":"joe-github@cursive.net"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages-npm-production","tmp":"tmp/wtf8_0.0.5_1772552577444_0.6134191218540708"},"_hasShrinkwrap":false,"publish_time":1772552577614,"_cnpm_publish_time":1772552577614},"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":"http://registry-npm.ywwl.com/@cto.af/wtf8/download/@cto.af/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,"size":5021,"noattachment":false,"key":"/@cto.af/wtf8/-/@cto.af/wtf8-0.0.4.tgz"},"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"},"publish_time":1754167596803,"_cnpm_publish_time":1754167596803},"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":"http://registry-npm.ywwl.com/@cto.af/wtf8/download/@cto.af/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,"size":5021,"noattachment":false,"key":"/@cto.af/wtf8/-/@cto.af/wtf8-0.0.3.tgz"},"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"},"publish_time":1750519046545,"_cnpm_publish_time":1750519046545},"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":"http://registry-npm.ywwl.com/@cto.af/wtf8/download/@cto.af/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,"size":5020,"noattachment":false,"key":"/@cto.af/wtf8/-/@cto.af/wtf8-0.0.2.tgz"},"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"},"publish_time":1745958773234,"_cnpm_publish_time":1745958773234},"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":"http://registry-npm.ywwl.com/@cto.af/wtf8/download/@cto.af/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,"size":4862,"noattachment":false,"key":"/@cto.af/wtf8/-/@cto.af/wtf8-0.0.1.tgz"},"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"},"publish_time":1745947836572,"_cnpm_publish_time":1745947836572}},"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","_attachments":{},"homepage":"https://github.com/cto-af/wtf8#readme","bugs":{"url":"https://github.com/cto-af/wtf8/issues"},"license":"MIT"}