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
+26-1Lines changed: 26 additions & 1 deletion
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -74,7 +74,7 @@ And nested ones, too.
74
74
|`Date`|`string` via `toISOString()`|
75
75
|`RegExp`|`string`|
76
76
77
-
#### Required
77
+
#### Required
78
78
You can set specific fields of an object as `required` in your schema, by adding `required: true` inside the key properties.
79
79
Example:
80
80
```javascript
@@ -94,6 +94,31 @@ const schema = {
94
94
```
95
95
If the object to stringify has not the required field(s), `fast-json-stringify` will throw an error.
96
96
97
+
#### Missing fields
98
+
If a field *is present* in the schema (and is not required) but it *is not present* in the object to stringify, `fast-json-stringify` will not write it in the final string.
0 commit comments