remove node_modules and .gitignore them
This commit is contained in:
-1
@@ -1 +0,0 @@
|
||||
export const fromUtf8 = (input) => new TextEncoder().encode(input);
|
||||
-5
@@ -1,5 +0,0 @@
|
||||
import { fromString } from "@smithy/util-buffer-from";
|
||||
export const fromUtf8 = (input) => {
|
||||
const buf = fromString(input, "utf8");
|
||||
return new Uint8Array(buf.buffer, buf.byteOffset, buf.byteLength / Uint8Array.BYTES_PER_ELEMENT);
|
||||
};
|
||||
-3
@@ -1,3 +0,0 @@
|
||||
export * from "./fromUtf8";
|
||||
export * from "./toUint8Array";
|
||||
export * from "./toUtf8";
|
||||
-10
@@ -1,10 +0,0 @@
|
||||
import { fromUtf8 } from "./fromUtf8";
|
||||
export const toUint8Array = (data) => {
|
||||
if (typeof data === "string") {
|
||||
return fromUtf8(data);
|
||||
}
|
||||
if (ArrayBuffer.isView(data)) {
|
||||
return new Uint8Array(data.buffer, data.byteOffset, data.byteLength / Uint8Array.BYTES_PER_ELEMENT);
|
||||
}
|
||||
return new Uint8Array(data);
|
||||
};
|
||||
-1
@@ -1 +0,0 @@
|
||||
export const toUtf8 = (input) => new TextDecoder("utf-8").decode(input);
|
||||
-2
@@ -1,2 +0,0 @@
|
||||
import { fromArrayBuffer } from "@smithy/util-buffer-from";
|
||||
export const toUtf8 = (input) => fromArrayBuffer(input.buffer, input.byteOffset, input.byteLength).toString("utf8");
|
||||
Reference in New Issue
Block a user