diff options
author | crowlKats <crowlkats@gmail.com> | 2020-03-13 10:22:22 +0100 |
---|---|---|
committer | GitHub <noreply@github.com> | 2020-03-13 10:22:22 +0100 |
commit | e435c2be158ce8657dbff0664b6db222fe4e586c (patch) | |
tree | b0e72033be2ce51a70fd2c2af23e6da131a642bb /cli/js/read_file.ts | |
parent | 3ac642c183981a366e1db565c16b81f864b07ee4 (diff) |
Remove doc strings from cli/js TS files (#4329)
Co-authored-by: Ryan Dahl <ry@tinyclouds.org>
Diffstat (limited to 'cli/js/read_file.ts')
-rw-r--r-- | cli/js/read_file.ts | 14 |
1 files changed, 0 insertions, 14 deletions
diff --git a/cli/js/read_file.ts b/cli/js/read_file.ts index 43372ca45..317401af5 100644 --- a/cli/js/read_file.ts +++ b/cli/js/read_file.ts @@ -2,13 +2,6 @@ import { open, openSync } from "./files.ts"; import { readAll, readAllSync } from "./buffer.ts"; -/** Reads and returns the entire contents of a file. - * - * const decoder = new TextDecoder("utf-8"); - * const data = Deno.readFileSync("hello.txt"); - * console.log(decoder.decode(data)); - * - * Requires `allow-read` permission. */ export function readFileSync(path: string): Uint8Array { const file = openSync(path); const contents = readAllSync(file); @@ -16,13 +9,6 @@ export function readFileSync(path: string): Uint8Array { return contents; } -/** Reads and resolves to the entire contents of a file. - * - * const decoder = new TextDecoder("utf-8"); - * const data = await Deno.readFile("hello.txt"); - * console.log(decoder.decode(data)); - * - * Requires `allow-read` permission. */ export async function readFile(path: string): Promise<Uint8Array> { const file = await open(path); const contents = await readAll(file); |