diff options
author | tokiedokie <thetokiedokie@gmail.com> | 2020-10-04 21:18:36 +0900 |
---|---|---|
committer | GitHub <noreply@github.com> | 2020-10-04 14:18:36 +0200 |
commit | 3d65177dbcaf6d08c7e4a412beece8ee6939d466 (patch) | |
tree | 53b5954f612daa559f8e893471083f854ea63464 /std/io | |
parent | ec963238230c7f92a29da27ced0a2ec706af92d0 (diff) |
docs(std): version all imports in README (#7442)
Use $STD_VERSION in std/ README files to automatically
display proper version.
Diffstat (limited to 'std/io')
-rw-r--r-- | std/io/README.md | 20 |
1 files changed, 10 insertions, 10 deletions
diff --git a/std/io/README.md b/std/io/README.md index 25bd9881b..46274d321 100644 --- a/std/io/README.md +++ b/std/io/README.md @@ -9,8 +9,8 @@ Read reader[like file], line by line: ```ts title="readLines" -import { readLines } from "https://deno.land/std/io/mod.ts"; -import * as path from "https://deno.land/std/path/mod.ts"; +import { readLines } from "https://deno.land/std@$STD_VERSION/io/mod.ts"; +import * as path from "https://deno.land/std@$STD_VERSION/path/mod.ts"; const filename = path.join(Deno.cwd(), "std/io/README.md"); let fileReader = await Deno.open(filename); @@ -28,7 +28,7 @@ for await (let line of readLines(fileReader)) { ## readLines ```ts -import * as path from "https://deno.land/std/path/mod.ts"; +import * as path from "https://deno.land/std@$STD_VERSION/path/mod.ts"; ## Rest of the file ```` @@ -38,8 +38,8 @@ import * as path from "https://deno.land/std/path/mod.ts"; Read reader`[like file]` chunk by chunk, splitting based on delimiter. ```ts title="readStringDelim" -import { readStringDelim } from "https://deno.land/std/io/mod.ts"; -import * as path from "https://deno.land/std/path/mod.ts"; +import { readStringDelim } from "https://deno.land/std@$STD_VERSION/io/mod.ts"; +import * as path from "https://deno.land/std@$STD_VERSION/path/mod.ts"; const filename = path.join(Deno.cwd(), "std/io/README.md"); let fileReader = await Deno.open(filename); @@ -57,7 +57,7 @@ for await (let line of readStringDelim(fileReader, "\n")) { ## readLines ```ts -import * as path from "https://deno.land/std/path/mod.ts"; +import * as path from "https://deno.land/std@$STD_VERSION/path/mod.ts"; ## Rest of the file ```` @@ -69,7 +69,7 @@ import * as path from "https://deno.land/std/path/mod.ts"; Create a `Reader` object for `string`. ```ts -import { StringReader } from "https://deno.land/std/io/mod.ts"; +import { StringReader } from "https://deno.land/std@$STD_VERSION/io/mod.ts"; const data = new Uint8Array(6); const r = new StringReader("abcdef"); @@ -104,7 +104,7 @@ import { copyN, StringReader, StringWriter, -} from "https://deno.land/std/io/mod.ts"; +} from "https://deno.land/std@$STD_VERSION/io/mod.ts"; const w = new StringWriter("base"); const r = new StringReader("0123456789"); @@ -131,7 +131,7 @@ base0123456789 Creates a `Reader` from a `ReadableStreamDefaultReader`. ```ts -import { fromStreamReader } from "https://deno.land/std/io/mod.ts"; +import { fromStreamReader } from "https://deno.land/std@$STD_VERSION/io/mod.ts"; const res = await fetch("https://deno.land"); const file = await Deno.open("./deno.land.html", { create: true, write: true }); @@ -145,7 +145,7 @@ file.close(); Creates a `Writer` from a `WritableStreamDefaultWriter`. ```ts -import { fromStreamWriter } from "https://deno.land/std/io/mod.ts"; +import { fromStreamWriter } from "https://deno.land/std@$STD_VERSION/io/mod.ts"; const file = await Deno.open("./deno.land.html", { read: true }); const writableStream = new WritableStream({ |