Comparing version 1.0.0 to 1.0.1
@@ -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 @@ } |
{ | ||
"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
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
73546
863
3