Commit 8a0cae5
authored
chore: improve stringifyJSON in case toJSON exists (#643)
<!-- This is an auto-generated comment: release notes by coderabbit.ai
-->
## Summary by CodeRabbit
- **New Features**
- Enhanced support for objects with custom `toJSON` methods in JSON
stringification.
- **Tests**
- Added new test cases to verify correct handling of objects with
`toJSON` methods returning `undefined`.
<!-- end of auto-generated comment: release notes by coderabbit.ai -->1 parent 5b22383 commit 8a0cae5
File tree
3 files changed
+3
-1
lines changed3 files changed
+3
-1
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
3 | 3 | | |
4 | 4 | | |
5 | 5 | | |
| 6 | + | |
6 | 7 | | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
10 | 10 | | |
11 | 11 | | |
12 | 12 | | |
| 13 | + | |
13 | 14 | | |
14 | 15 | | |
15 | 16 | | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
6 | 6 | | |
7 | 7 | | |
8 | 8 | | |
9 | | - | |
| 9 | + | |
10 | 10 | | |
11 | 11 | | |
12 | 12 | | |
0 commit comments