can-reflect
Advanced tools
Comparing version 1.17.6 to 1.17.7
{ | ||
"name": "can-reflect", | ||
"version": "1.17.6", | ||
"version": "1.17.7", | ||
"description": "reflection on unknown data types", | ||
@@ -5,0 +5,0 @@ "homepage": "http://canjs.com", |
@@ -187,4 +187,2 @@ var QUnit = require('steal-qunit'); | ||
QUnit.test("hasOwnKey", function(){ | ||
var map; | ||
@@ -208,2 +206,12 @@ // Defined on something | ||
QUnit.test("hasOwnKey on null derived object", function(){ | ||
var obj = Object.create(null); | ||
obj.foo = "bar"; | ||
QUnit.ok( shapeReflections.hasOwnKey(obj, "foo") , "obj" ); | ||
QUnit.ok( !shapeReflections.hasOwnKey(obj, "bar") , "obj" ); | ||
}); | ||
QUnit.test("getOwnKeys", function(){ | ||
@@ -210,0 +218,0 @@ var obj = Object.create(null,{ |
@@ -76,2 +76,4 @@ "use strict"; | ||
var hasOwnProperty = Object.prototype.hasOwnProperty; | ||
var shapeReflections; | ||
@@ -560,3 +562,3 @@ | ||
} | ||
return obj.hasOwnProperty(key); | ||
return hasOwnProperty.call(obj, key); | ||
}, | ||
@@ -1062,3 +1064,3 @@ /** | ||
if (typeReflections.isPrimitive(obj)) { | ||
if (Object.prototype.hasOwnProperty.call(obj, key)) { | ||
if (hasOwnProperty.call(obj, key)) { | ||
return true; | ||
@@ -1065,0 +1067,0 @@ } else { |
New author
Supply chain riskA new npm collaborator published a version of the package for the first time. New collaborators are usually benign additions to a project, but do indicate a change to the security surface area of a package.
Found 1 instance in 1 package
179980
4892
0