flat

Take a nested Javascript object and flatten it, or unflatten an object with delimited keys

jsesc

Given some data, jsesc returns the shortest possible stringified & ASCII-safe representation of that data.