Socket
Socket
Sign inDemoInstall

stringify-object

Package Overview
Dependencies
0
Maintainers
4
Versions
28
Alerts
File Explorer

Advanced tools

Install Socket

Detect and block malicious and high-risk dependencies

Install

Comparing version 0.1.5 to 0.1.6

2

package.json
{
"name": "stringify-object",
"version": "0.1.5",
"version": "0.1.6",
"description": "Stringify an object/array like JSON.stringify just without all the double-quotes",

@@ -5,0 +5,0 @@ "keywords": [

@@ -34,3 +34,2 @@ /*global window */

opts.indent = opts.indent || '\t';
opts.quote = opts.singleQuotes === false ? '"' : '\'';
pad = pad || '';

@@ -76,6 +75,7 @@

return opts.quote + val.replace(
opts.singleQuotes ? /'/g : /"/g,
opts.singleQuotes ? '\\\"' : '\\\''
) + opts.quote;
if (opts.singleQuotes === false) {
return '"' + val.replace(/"/g, '\\\"') + '"';
} else {
return "'" + val.replace(/'/g, "\\\'") + "'";
}
})(val, opts, pad);

@@ -82,0 +82,0 @@ }

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc