From 12c6b2395be2bd1371284adf03e4826ba5edc761 Mon Sep 17 00:00:00 2001 From: Ryan Dahl Date: Wed, 1 Apr 2020 15:23:39 -0400 Subject: Move encode, decode helpers to /std/encoding/utf8.ts, delete /std/strings/ (#4565) also removes std/encoding/mod.ts and std/archive/mod.ts which are useless. --- std/io/readers.ts | 2 +- std/io/readers_test.ts | 2 +- std/io/util.ts | 2 +- std/io/writers.ts | 2 +- 4 files changed, 4 insertions(+), 4 deletions(-) (limited to 'std/io') diff --git a/std/io/readers.ts b/std/io/readers.ts index 2d81e246f..8a567d7d1 100644 --- a/std/io/readers.ts +++ b/std/io/readers.ts @@ -1,6 +1,6 @@ // Copyright 2018-2020 the Deno authors. All rights reserved. MIT license. type Reader = Deno.Reader; -import { encode } from "../strings/mod.ts"; +import { encode } from "../encoding/utf8.ts"; /** Reader utility for strings */ export class StringReader implements Reader { diff --git a/std/io/readers_test.ts b/std/io/readers_test.ts index e3aaad0a5..22982c924 100644 --- a/std/io/readers_test.ts +++ b/std/io/readers_test.ts @@ -3,7 +3,7 @@ import { assertEquals } from "../testing/asserts.ts"; import { MultiReader, StringReader } from "./readers.ts"; import { StringWriter } from "./writers.ts"; import { copyN } from "./ioutil.ts"; -import { decode } from "../strings/mod.ts"; +import { decode } from "../encoding/utf8.ts"; test(async function ioStringReader(): Promise { const r = new StringReader("abcdef"); diff --git a/std/io/util.ts b/std/io/util.ts index 4bcf7d2e9..4479e2c38 100644 --- a/std/io/util.ts +++ b/std/io/util.ts @@ -3,7 +3,7 @@ const { Buffer, mkdir, open } = Deno; type File = Deno.File; type Reader = Deno.Reader; import * as path from "../path/mod.ts"; -import { encode } from "../strings/mod.ts"; +import { encode } from "../encoding/utf8.ts"; // `off` is the offset into `dst` where it will at which to begin writing values // from `src`. diff --git a/std/io/writers.ts b/std/io/writers.ts index b9a6a5e70..8e085c84b 100644 --- a/std/io/writers.ts +++ b/std/io/writers.ts @@ -1,6 +1,6 @@ // Copyright 2018-2020 the Deno authors. All rights reserved. MIT license. type Writer = Deno.Writer; -import { decode, encode } from "../strings/mod.ts"; +import { decode, encode } from "../encoding/utf8.ts"; /** Writer utility for buffering string chunks */ export class StringWriter implements Writer { -- cgit v1.2.3