Skip to content

Commit 6f901f2

Browse files
committed
feat(stringify): extend acceptable data types
1 parent f917da3 commit 6f901f2

File tree

2 files changed

+3
-4
lines changed

2 files changed

+3
-4
lines changed

README.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -42,7 +42,7 @@ assertThrows(() => parseJfv("<invalid:JSON>"));
4242

4343
## Serialization
4444

45-
Serialize [JSON field value](#json-field-value) into string.
45+
Serialize any array into string.
4646

4747
```ts
4848
import { stringifyJfv } from "https://deno.land/x/jfv_parser@$VERSION/stringify.ts";

stringify.ts

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -3,13 +3,12 @@
33

44
import { ascii } from "./deps.ts";
55
import { Char } from "./constants.ts";
6-
import type { JsonValue } from "./types.ts";
76

8-
/** Serializer array of {@link JsonValue} into string.
7+
/** Serialize any array into string.
98
*
109
* @throws {TypeError} If input contains a circular reference.
1110
*/
12-
export function stringifyJfv(input: readonly Readonly<JsonValue>[]): string {
11+
export function stringifyJfv(input: readonly unknown[]): string {
1312
/** Specification:
1413
* 1. generating the JSON representation,
1514
* 2. stripping all JSON control characters (CR, HTAB, LF), or replacing them by space ("SP") characters,

0 commit comments

Comments
 (0)