aboutsummaryrefslogtreecommitdiff
path: root/src/bun.js/webcore/encoding.classes.ts
diff options
context:
space:
mode:
authorGravatar Jarred Sumner <709451+Jarred-Sumner@users.noreply.github.com> 2022-08-18 19:06:29 -0700
committerGravatar Jarred Sumner <709451+Jarred-Sumner@users.noreply.github.com> 2022-08-18 19:06:29 -0700
commite3c2a95e5ff4e6c6b63839f4773cc3f5aeadddc8 (patch)
treeec2e43f3a33bdd784473022b00121f4c597c8e09 /src/bun.js/webcore/encoding.classes.ts
parente45ddc086fe6b3e7a32aa45607f5e3d570998137 (diff)
downloadbun-e3c2a95e5ff4e6c6b63839f4773cc3f5aeadddc8.tar.gz
bun-e3c2a95e5ff4e6c6b63839f4773cc3f5aeadddc8.tar.zst
bun-e3c2a95e5ff4e6c6b63839f4773cc3f5aeadddc8.zip
Faster TextDecoder
Diffstat (limited to 'src/bun.js/webcore/encoding.classes.ts')
-rw-r--r--src/bun.js/webcore/encoding.classes.ts25
1 files changed, 25 insertions, 0 deletions
diff --git a/src/bun.js/webcore/encoding.classes.ts b/src/bun.js/webcore/encoding.classes.ts
new file mode 100644
index 000000000..777f3715e
--- /dev/null
+++ b/src/bun.js/webcore/encoding.classes.ts
@@ -0,0 +1,25 @@
+import { define } from "../scripts/class-definitions";
+
+export default [
+ define({
+ name: "TextDecoder",
+ construct: true,
+ finalize: true,
+ JSType: "0b11101110",
+ klass: {},
+ proto: {
+ encoding: {
+ getter: "getEncoding",
+ cache: true,
+ },
+ fatal: {
+ getter: "getFatal",
+ },
+
+ decode: {
+ fn: "decode",
+ length: 1,
+ },
+ },
+ }),
+];