From acda3e02440d4056bd824e56d425422694d6e382 Mon Sep 17 00:00:00 2001 From: Robert Yawn Date: Thu, 30 Jun 2016 15:55:19 +0200 Subject: [PATCH 1/2] remove hasOwnProperty call --- index.js | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/index.js b/index.js index 4f45b70..69b7d79 100644 --- a/index.js +++ b/index.js @@ -2,11 +2,9 @@ module.exports = function deepFreeze (o) { Object.freeze(o); var oIsFunction = typeof o === "function"; - var hasOwnProp = Object.prototype.hasOwnProperty; Object.getOwnPropertyNames(o).forEach(function (prop) { - if (hasOwnProp.call(o, prop) - && (oIsFunction ? prop !== 'caller' && prop !== 'callee' && prop !== 'arguments' : true ) + if ((oIsFunction ? prop !== 'caller' && prop !== 'callee' && prop !== 'arguments' : true ) && o[prop] !== null && (typeof o[prop] === "object" || typeof o[prop] === "function") && !Object.isFrozen(o[prop])) { From 1f59613a43ec62f3f6b98c575d381ba399c66901 Mon Sep 17 00:00:00 2001 From: Robert Yawn Date: Thu, 30 Jun 2016 15:59:34 +0200 Subject: [PATCH 2/2] add more flavors/versions of nodejs to travis config --- .travis.yml | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/.travis.yml b/.travis.yml index 895dbd3..5346f6e 100644 --- a/.travis.yml +++ b/.travis.yml @@ -1,4 +1,7 @@ language: node_js node_js: - - 0.6 - - 0.8 + - "node" + - "6" + - "4" + - "0.12" + - "0.10"