A simple implementation of turning a JS JSON object into a string


Return / ^ (string | number) $/. Test typeof (s)? ’” + s + ”’ : s;

Return /^(string)$/.test(typeof s)? ’” + s + ”’ : s;

(just ignore the number type)