serialize-javascript
serialize-javascript copied to clipboard
extract same refs of object
It's very nice if support extracting same refs of object, for example
var obj = {}
serialize({b: obj, c: obj})
get
(function() { var a = {}; return {"b": a, "c": a} })()