Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

serialize-to-js

Package Overview
Dependencies
Maintainers
1
Versions
24
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

serialize-to-js - npm Package Compare versions

Comparing version 0.1.1 to 0.1.2

2

lib/reference.js

@@ -29,3 +29,3 @@ /*

Ref.wrapkey = function(key) {
return (KEY.test(key) ? key : '"'+key+'"');
return (KEY.test(key) ? key : '"'+key.replace(/"/g,'\\"')+'"');
};

@@ -32,0 +32,0 @@

{
"name": "serialize-to-js",
"version": "0.1.1",
"version": "0.1.2",
"description": "serialize objects to javascript",

@@ -5,0 +5,0 @@ "main": "index.js",

@@ -115,7 +115,8 @@ 'use strict';

"3": "3",
"4 four": "four"
"4 four": "four",
"five\"(5)": 5,
};
var o = { a: o1, b: o1 };
var res = M.serialize(o);
var exp = '{a: {"3": "3", one: true, "thr-ee": undefined, "4 four": "four"}, b: {"3": "3", one: true, "thr-ee": undefined, "4 four": "four"}}';
var exp = '{a: {"3": "3", one: true, "thr-ee": undefined, "4 four": "four", "five\\"(5)": 5}, b: {"3": "3", one: true, "thr-ee": undefined, "4 four": "four", "five\\"(5)": 5}}';
//~ console.log(res);

@@ -122,0 +123,0 @@ assert.equal(res, exp);

SocketSocket SOC 2 Logo

Product

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

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc