-
-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
5 changed files
with
14 additions
and
14 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -25,7 +25,7 @@ each JSON. | |
import { | ||
ConcatenatedJSONStream, | ||
JSONLinesStream, | ||
} from "https://deno.land/x/[email protected].5/mod.ts"; | ||
} from "https://deno.land/x/[email protected].6/mod.ts"; | ||
``` | ||
|
||
##### browser | ||
|
@@ -34,7 +34,7 @@ import { | |
import { | ||
ConcatenatedJSONStream, | ||
JSONLinesStream, | ||
} from "https://deno.land/x/[email protected].5/js/mod.js"; | ||
} from "https://deno.land/x/[email protected].6/js/mod.js"; | ||
``` | ||
|
||
## Usage | ||
|
@@ -52,10 +52,10 @@ A working example can be found at [./testdata/test.ts](./testdata/test.ts). | |
``` | ||
|
||
```ts | ||
import { JSONLinesStream } from "https://deno.land/x/[email protected].5/mod.ts"; | ||
import { JSONLinesStream } from "https://deno.land/x/[email protected].6/mod.ts"; | ||
|
||
const { body } = await fetch( | ||
"https://deno.land/x/[email protected].5/testdata/json-lines.jsonl", | ||
"https://deno.land/x/[email protected].6/testdata/json-lines.jsonl", | ||
); | ||
|
||
const readable = body! | ||
|
@@ -85,10 +85,10 @@ for await (const data of readable) { | |
``` | ||
|
||
```ts | ||
import { JSONLinesStream } from "https://deno.land/x/[email protected].5/mod.ts"; | ||
import { JSONLinesStream } from "https://deno.land/x/[email protected].6/mod.ts"; | ||
|
||
const { body } = await fetch( | ||
"https://deno.land/x/[email protected].5/testdata/json-seq.json-seq", | ||
"https://deno.land/x/[email protected].6/testdata/json-seq.json-seq", | ||
); | ||
|
||
const recordSeparator = "\x1E"; | ||
|
@@ -110,10 +110,10 @@ for await (const data of readable) { | |
``` | ||
|
||
```ts | ||
import { ConcatenatedJSONStream } from "https://deno.land/x/[email protected].5/mod.ts"; | ||
import { ConcatenatedJSONStream } from "https://deno.land/x/[email protected].6/mod.ts"; | ||
|
||
const { body } = await fetch( | ||
"https://deno.land/x/[email protected].5/testdata/concat-json.concat-json", | ||
"https://deno.land/x/[email protected].6/testdata/concat-json.concat-json", | ||
); | ||
|
||
const readable = body! | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,5 +1,5 @@ | ||
{ | ||
"imports": { | ||
"https://deno.land/x/[email protected].5/": "./" | ||
"https://deno.land/x/[email protected].6/": "./" | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -45,7 +45,7 @@ if (typeof ReadableStream.prototype[Symbol.asyncIterator] !== "function") { | |
* stream to parse JSONLines. | ||
* | ||
* ```ts | ||
* import { JSONLinesStream } from "https://deno.land/x/[email protected].5/mod.ts"; | ||
* import { JSONLinesStream } from "https://deno.land/x/[email protected].6/mod.ts"; | ||
* | ||
* const url = new URL("./testdata/json-lines.jsonl", import.meta.url); | ||
* const { body } = await fetch(`${url}`); | ||
|
@@ -108,7 +108,7 @@ if (typeof ReadableStream.prototype[Symbol.asyncIterator] !== "function") { | |
* stream to parse concatenated JSON. | ||
* | ||
* ```ts | ||
* import { ConcatenatedJSONStream } from "https://deno.land/x/[email protected].5/mod.ts"; | ||
* import { ConcatenatedJSONStream } from "https://deno.land/x/[email protected].6/mod.ts"; | ||
* | ||
* const url = new URL("./testdata/concat-json.concat-json", import.meta.url); | ||
* const { body } = await fetch(`${url}`); | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -95,7 +95,7 @@ function createStream( | |
* stream to parse JSONLines. | ||
* | ||
* ```ts | ||
* import { JSONLinesStream } from "https://deno.land/x/[email protected].5/mod.ts"; | ||
* import { JSONLinesStream } from "https://deno.land/x/[email protected].6/mod.ts"; | ||
* | ||
* const url = new URL("./testdata/json-lines.jsonl", import.meta.url); | ||
* const { body } = await fetch(`${url}`); | ||
|
@@ -169,7 +169,7 @@ export class JSONLinesStream implements TransformStream<string, JSONValue> { | |
* stream to parse concatenated JSON. | ||
* | ||
* ```ts | ||
* import { ConcatenatedJSONStream } from "https://deno.land/x/[email protected].5/mod.ts"; | ||
* import { ConcatenatedJSONStream } from "https://deno.land/x/[email protected].6/mod.ts"; | ||
* | ||
* const url = new URL("./testdata/concat-json.concat-json", import.meta.url); | ||
* const { body } = await fetch(`${url}`); | ||
|