summaryrefslogtreecommitdiff
path: root/std/io/util.ts
diff options
context:
space:
mode:
authorRyan Dahl <ry@tinyclouds.org>2020-06-06 10:37:52 -0400
committerGitHub <noreply@github.com>2020-06-06 10:37:52 -0400
commit1a2f88609b3e1bc27790c77331ac96b423625eb6 (patch)
treed950e2cb4aaafc459b16d4f9333b2c29d7adbcc4 /std/io/util.ts
parent78333f0ab3614e8dbd3dfdc95e9dbb53f80ffe5d (diff)
fix(std/io): StringReader implementation (#6148)
Diffstat (limited to 'std/io/util.ts')
-rw-r--r--std/io/util.ts7
1 files changed, 1 insertions, 6 deletions
diff --git a/std/io/util.ts b/std/io/util.ts
index 237747a89..47e48a981 100644
--- a/std/io/util.ts
+++ b/std/io/util.ts
@@ -1,9 +1,8 @@
// Copyright 2018-2020 the Deno authors. All rights reserved. MIT license.
-const { Buffer, mkdir, open } = Deno;
+const { mkdir, open } = Deno;
type File = Deno.File;
type Reader = Deno.Reader;
import * as path from "../path/mod.ts";
-import { encode } from "../encoding/utf8.ts";
/**
* Copy bytes from one Uint8Array to another. Bytes from `src` which don't fit
@@ -28,10 +27,6 @@ export function charCode(s: string): number {
return s.charCodeAt(0);
}
-export function stringsReader(s: string): Reader {
- return new Buffer(encode(s).buffer);
-}
-
/** Create or open a temporal file at specified directory with prefix and
* postfix
* */