summaryrefslogtreecommitdiff
path: root/textproto.ts
diff options
context:
space:
mode:
Diffstat (limited to 'textproto.ts')
-rw-r--r--textproto.ts7
1 files changed, 5 insertions, 2 deletions
diff --git a/textproto.ts b/textproto.ts
index 4c4b92627..342d74b33 100644
--- a/textproto.ts
+++ b/textproto.ts
@@ -137,10 +137,13 @@ export class TextProtoReader {
}
}
-function append(a: Uint8Array, b: Uint8Array): Uint8Array {
+export function append(a: Uint8Array, b: Uint8Array): Uint8Array {
if (a == null) {
return b;
} else {
- throw Error("Not implemented");
+ const output = new Uint8Array(a.length + b.length);
+ output.set(a, 0);
+ output.set(b, a.length);
+ return output;
}
}