File tree Expand file tree Collapse file tree 1 file changed +14
-3
lines changed Expand file tree Collapse file tree 1 file changed +14
-3
lines changed Original file line number Diff line number Diff line change @@ -34,14 +34,18 @@ const stringify = fastJson({
34
34
age: {
35
35
description: ' Age in years' ,
36
36
type: ' integer'
37
+ },
38
+ reg: {
39
+ type: ' string'
37
40
}
38
41
}
39
42
})
40
43
41
44
console .log (stringify ({
42
45
firstName: ' Matteo' ,
43
46
lastName: ' Collina' ,
44
- age: 32
47
+ age: 32 ,
48
+ reg: / "([^ "] | \\ ")* "/
45
49
}))
46
50
```
47
51
@@ -61,8 +65,15 @@ Supported types:
61
65
* ` 'boolean' `
62
66
* ` 'null' `
63
67
64
- And nested ones, too.
65
- ` Date ` instances are serialized with ` toISOString() ` .
68
+ And nested ones, too.
69
+
70
+ * Specific use cases:*
71
+
72
+ | Instance | Serialized as |
73
+ | -----------| ---------------------------------------------|
74
+ | ` Date ` | ` string ` <small >via ` toISOString() ` </small > |
75
+ | ` RegExp ` | ` string ` |
76
+
66
77
67
78
## Acknowledgements
68
79
You can’t perform that action at this time.
0 commit comments