deep-freeze-strict
Advanced tools
Comparing version 1.0.0 to 1.1.0
@@ -5,5 +5,6 @@ module.exports = function deepFreeze (o) { | ||
var oIsFunction = typeof o === "function"; | ||
var hasOwnProp = Object.prototype.hasOwnProperty; | ||
Object.getOwnPropertyNames(o).forEach(function (prop) { | ||
if (o.hasOwnProperty(prop) | ||
if (hasOwnProp.call(o, prop) | ||
&& (oIsFunction ? prop !== 'caller' && prop !== 'callee' && prop !== 'arguments' : true ) | ||
@@ -10,0 +11,0 @@ && o[prop] !== null |
{ | ||
"name" : "deep-freeze-strict", | ||
"version" : "1.0.0", | ||
"description" : "recursively Object.freeze() objects and functions, works in strict mode", | ||
"main" : "index.js", | ||
"directories" : { | ||
"example" : "example", | ||
"test" : "test" | ||
}, | ||
"devDependencies" : { | ||
"tap" : "~0.3.0" | ||
}, | ||
"scripts" : { | ||
"test" : "tap test/*.js" | ||
}, | ||
"repository" : { | ||
"type" : "git", | ||
"url" : "git://github.com/jsdf/deep-freeze.git" | ||
}, | ||
"homepage" : "https://github.com/jsdf/deep-freeze", | ||
"keywords" : [ | ||
"freeze", | ||
"deep", | ||
"object", | ||
"recursive", | ||
"strict-mode" | ||
], | ||
"author" : { | ||
"name" : "James Friend", | ||
"email" : "james@jsdf.co", | ||
"url" : "http://jsdf.co" | ||
}, | ||
"license" : "public domain" | ||
"name": "deep-freeze-strict", | ||
"version": "1.1.0", | ||
"description": "recursively Object.freeze() objects and functions, works in strict mode", | ||
"main": "index.js", | ||
"directories": { | ||
"example": "example", | ||
"test": "test" | ||
}, | ||
"devDependencies": { | ||
"tap": "~0.3.0" | ||
}, | ||
"scripts": { | ||
"test": "tap test/*.js" | ||
}, | ||
"repository": { | ||
"type": "git", | ||
"url": "git://github.com/jsdf/deep-freeze.git" | ||
}, | ||
"homepage": "https://github.com/jsdf/deep-freeze", | ||
"keywords": [ | ||
"freeze", | ||
"deep", | ||
"object", | ||
"recursive", | ||
"strict-mode" | ||
], | ||
"author": { | ||
"name": "James Friend", | ||
"email": "james@jsdf.co", | ||
"url": "http://jsdf.co" | ||
}, | ||
"license": "public domain" | ||
} |
@@ -7,3 +7,3 @@ var test = require('tap').test; | ||
t.plan(1); | ||
t.plan(2); | ||
@@ -19,5 +19,5 @@ var a = { | ||
} catch (e) { | ||
if (e.type !== 'object_not_extensible') throw e; | ||
t.ok('error thrown as expected'); | ||
} | ||
t.equal(a.x, undefined); | ||
}); |
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
3793
10
65