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({
3434 age: {
3535 description: ' Age in years' ,
3636 type: ' integer'
37+ },
38+ reg: {
39+ type: ' string'
3740 }
3841 }
3942})
4043
4144console .log (stringify ({
4245 firstName: ' Matteo' ,
4346 lastName: ' Collina' ,
44- age: 32
47+ age: 32 ,
48+ reg: / "([^ "] | \\ ")* "/
4549}))
4650```
4751
@@ -61,8 +65,15 @@ Supported types:
6165 * ` 'boolean' `
6266 * ` 'null' `
6367
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+
6677
6778## Acknowledgements
6879
You can’t perform that action at this time.
0 commit comments