Skip to content

Commit b0bf39f

Browse files
committed
tweak
1 parent 800a42b commit b0bf39f

2 files changed

Lines changed: 4 additions & 0 deletions

File tree

src/jsonify/parse.ts

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -91,6 +91,8 @@ function unpack(
9191
return hydrated[idx] = set;
9292
}
9393
case "Uint8Array":
94+
// TODO(iuioiua): use `Uint8Array.prototype.fromBase64()` once
95+
// available (https://github.com/denoland/deno/issues/25051)
9496
return hydrated[idx] = decodeBase64(current[1]);
9597
}
9698
} else {

src/jsonify/stringify.ts

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -110,6 +110,8 @@ function serializeInner(
110110
} else if (value instanceof RegExp) {
111111
str += `["RegExp",${JSON.stringify(value.source)}, "${value.flags}"]`;
112112
} else if (value instanceof Uint8Array) {
113+
// TODO(iuioiua): use `Uint8Array.prototype.toBase64()` once available
114+
// (https://github.com/denoland/deno/issues/25051)
113115
str += `["Uint8Array","${encodeBase64(value)}"]`;
114116
} else if (value instanceof Set) {
115117
const items = new Array(value.size);

0 commit comments

Comments
 (0)