diff --git a/deps.ts b/deps.ts deleted file mode 100644 index 8243dfd..0000000 --- a/deps.ts +++ /dev/null @@ -1 +0,0 @@ -export { encode, decode } from "https://deno.land/std@0.78.0/encoding/utf8.ts"; diff --git a/tty_async.ts b/tty_async.ts index 4ed2b8d..a053745 100644 --- a/tty_async.ts +++ b/tty_async.ts @@ -1,4 +1,4 @@ -import { encode } from "./deps.ts"; +import { encode } from "./util.ts"; import { AsyncStream, diff --git a/tty_sync.ts b/tty_sync.ts index 8fcb760..803bbc1 100644 --- a/tty_sync.ts +++ b/tty_sync.ts @@ -1,4 +1,4 @@ -import { encode } from "./deps.ts"; +import { encode } from "./util.ts"; import { SyncStream, diff --git a/util.ts b/util.ts new file mode 100644 index 0000000..89415f0 --- /dev/null +++ b/util.ts @@ -0,0 +1,5 @@ +export const encoder = new TextEncoder(); + +export function encode(input?: string): Uint8Array { + return encoder.encode(input); +}