can-reflect
Advanced tools
Comparing version 1.16.1 to 1.16.2
{ | ||
"name": "can-reflect", | ||
"version": "1.16.1", | ||
"version": "1.16.2", | ||
"description": "reflection on unknown data types", | ||
@@ -5,0 +5,0 @@ "homepage": "http://canjs.com", |
@@ -571,6 +571,16 @@ var QUnit = require('steal-qunit'); | ||
QUnit.equal( shapeReflections.size({}), 0, "empty object") | ||
QUnit.equal( shapeReflections.size({foo:"bar"}), 1, "object") | ||
QUnit.equal( shapeReflections.size({}), 0, "empty object"); | ||
QUnit.equal( shapeReflections.size({foo:"bar"}), 1, "object"); | ||
QUnit.equal( shapeReflections.size(null), 0, "null"); | ||
QUnit.equal( shapeReflections.size(undefined), 0, "undefined"); | ||
}); | ||
QUnit.test("size works with out hasOwnProperty (#109)", function(){ | ||
var obj = Object.create(null); | ||
QUnit.equal( shapeReflections.size(obj), 0, "empty object"); | ||
obj.foo = "bar"; | ||
QUnit.equal( shapeReflections.size(obj), 1, "has value"); | ||
}); | ||
QUnit.test("each loops without needing `this`", function(){ | ||
@@ -583,2 +593,3 @@ var each = shapeReflections.each; | ||
/*QUnit.test("getAllEnumerableKeys", function(){ | ||
@@ -585,0 +596,0 @@ |
@@ -1068,2 +1068,5 @@ var canSymbol = require("can-symbol"); | ||
size: function(obj){ | ||
if(obj == null) { | ||
return 0; | ||
} | ||
var size = obj[sizeSymbol]; | ||
@@ -1070,0 +1073,0 @@ var count = 0; |
172225
4654