Serialize JavaScript to a superset of JSON that includes regular expressions and functions from Yahoo (no NPM requirements)
Serializer:
serialize(obj);
Available options:
space
isJSON
unsafe
ignoreFunction
Deserializer:
deserialize(jsons);
For more details please visit this link:
https://github.com/yahoo/serialize-javascript