An easier JSON stringify and parse with reviver and replacer to preserve Error, Date, Array, RegExp and custom Object instances. It works both in Node and browser.