can-reflect
Advanced tools
Comparing version 1.8.0 to 1.8.1
{ | ||
"name": "can-reflect", | ||
"version": "1.8.0", | ||
"version": "1.8.1", | ||
"description": "reflection on unknown data types", | ||
@@ -5,0 +5,0 @@ "homepage": "http://canjs.com", |
@@ -183,1 +183,11 @@ var QUnit = require('steal-qunit'); | ||
}); | ||
QUnit.test("array -like type is MoreListLikeThanMapLike", function(){ | ||
var MyArray = function(values) { | ||
this.push.apply(this, values); | ||
}; | ||
MyArray.prototype = Object.create(Array.prototype); | ||
MyArray.prototype.constructor = MyArray; | ||
var arr = new MyArray(); | ||
QUnit.ok(typeReflections.isMoreListLikeThanMapLike(arr), "is array like"); | ||
}); |
@@ -454,2 +454,5 @@ var canSymbol = require("can-symbol"); | ||
} | ||
if(obj instanceof Array) { | ||
return true; | ||
} | ||
var value = obj[canSymbol.for("can.isMoreListLikeThanMapLike")]; | ||
@@ -456,0 +459,0 @@ if(value !== undefined) { |
145878
3918