Skip to content

Commit 746f11f

Browse files
Make deserialization more explicit in usage example
1 parent 3735b1f commit 746f11f

File tree

1 file changed

+3
-0
lines changed

1 file changed

+3
-0
lines changed

README.md

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -35,6 +35,9 @@ devalue(obj); // '{a:1,b:2,c:3}'
3535

3636
obj.self = obj;
3737
devalue(obj); // '(function(a){a.a=1;a.b=2;a.c=3;a.self=a;return a}({}))'
38+
39+
// Deserialize into new object
40+
let newObject = (0, eval)("(" + devalue(obj) + ")");
3841
```
3942

4043
## Error handling

0 commit comments

Comments
 (0)