Socket
Socket
Sign inDemoInstall

ot-json0

Package Overview
Dependencies
Maintainers
1
Versions
3
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

ot-json0 - npm Package Compare versions

Comparing version 1.0.0 to 1.0.1

13

lib/json0.js

@@ -25,2 +25,13 @@ /*

/**
* Checks if the passed object is an Object instance.
* No function call (fast) version
*
* @param obj
* @returns {boolean}
*/
var isObject = function(obj) {
return (!!obj) && (obj.constructor === Object);
};
/**
* Clones the passed object using JSON serialization (which is slow).

@@ -104,3 +115,3 @@ *

json.checkObj = function(elem) {
if (elem.constructor !== Object) {
if (!isObject(elem)) {
throw new Error("Referenced element not an object (it was " + JSON.stringify(elem) + ")");

@@ -107,0 +118,0 @@ }

5

package.json
{
"name": "ot-json0",
"version": "1.0.0",
"version": "1.0.1",
"description": "JSON OT type",

@@ -12,3 +12,4 @@ "main": "lib/index.js",

"ot-fuzzer": "^1.0.0",
"mocha": "^1.20.1"
"mocha": "^1.20.1",
"coffee-script": "^1.7.1"
},

@@ -15,0 +16,0 @@ "scripts": {

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

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