can-reflect
Advanced tools
{ | ||
"name": "can-reflect", | ||
"version": "1.17.11", | ||
"version": "1.18.0", | ||
"description": "reflection on unknown data types", | ||
@@ -5,0 +5,0 @@ "homepage": "http://canjs.com", |
@@ -714,3 +714,15 @@ var QUnit = require('steal-qunit'); | ||
QUnit.test(".serialize works for observable built ins", function(assert) { | ||
var obj = document.createElement("div"); | ||
obj[canSymbol.for("can.serialize")] = function() { | ||
return "serialized value"; | ||
}; | ||
// mark object as observable | ||
obj[canSymbol.for("can.onKeyValue")] = function() {}; | ||
assert.deepEqual(shapeReflections.serialize(obj), "serialized value"); | ||
}); | ||
/*QUnit.test("getAllEnumerableKeys", function(){ | ||
@@ -717,0 +729,0 @@ |
@@ -108,3 +108,3 @@ "use strict"; | ||
} | ||
return typeReflections.isBuiltIn(obj) && !typeReflections.isPlainObject(obj) && !Array.isArray(obj); | ||
return typeReflections.isBuiltIn(obj) && !typeReflections.isPlainObject(obj) && !Array.isArray(obj) && !typeReflections.isObservableLike(obj); | ||
} | ||
@@ -111,0 +111,0 @@ |
Sorry, the diff of this file is not supported yet
183200
0.21%4945
0.18%