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
+6-1Lines changed: 6 additions & 1 deletion
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -280,7 +280,12 @@ stringify({
280
280
281
281
## Serializers
282
282
283
-
The `attr` helper accepts a serializer function.
283
+
The `attr` helper accepts a serializer function. The serializer function gets invoked with the real value that should be stringified.
284
+
285
+
```bash
286
+
serializer(rawValue)
287
+
```
288
+
284
289
Property serializers are useful to perform custom serialization on any provide type not natively supported even by `JSON.stringify` (Dates, regular expressions).
285
290
They can be used also to skip property serializarion when returning `undefined`.
0 commit comments