You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: README.md
+3-2Lines changed: 3 additions & 2 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -9,6 +9,7 @@ Like `JSON.stringify`, but handles
9
9
- dates
10
10
-`Map` and `Set`
11
11
-`BigInt`
12
+
- custom types via replacers, reducers and revivers
12
13
13
14
Try it out [here](https://svelte.dev/repl/138d70def7a748ce9eda736ef1c71239?version=3.49.0).
14
15
@@ -21,7 +22,7 @@ Try it out [here](https://svelte.dev/repl/138d70def7a748ce9eda736ef1c71239?versi
21
22
## Non-goals:
22
23
23
24
- Human-readable output
24
-
- Stringifying functions or non-POJOs
25
+
- Stringifying functions
25
26
26
27
## Usage
27
28
@@ -123,7 +124,7 @@ Note that any variables referenced in the resulting JavaScript (like `Vector` in
123
124
124
125
## Error handling
125
126
126
-
If `uneval` or `stringify` encounters a function or a non-POJO, it will throw an error. You can find where in the input data the offending value lives by inspecting `error.path`:
127
+
If `uneval` or `stringify` encounters a function or a non-POJO that isn't handled by a custom replacer/reducer, it will throw an error. You can find where in the input data the offending value lives by inspecting `error.path`:
0 commit comments