can-connect
Advanced tools
Comparing version 2.0.4 to 2.0.5
@@ -607,3 +607,3 @@ "use strict"; | ||
* <button ($click)="todo.save()" | ||
* {{#todo.isSaving}}disabled{{/todo.isSaving}}> | ||
* {{#todo.isSaving()}}disabled{{/todo.isSaving}}> | ||
* Save Changes | ||
@@ -610,0 +610,0 @@ * </button> |
@@ -9,2 +9,3 @@ var QUnit = require("steal-qunit"); | ||
var connect = require("can-connect"); | ||
var canReflect = require("can-reflect"); | ||
@@ -267,1 +268,29 @@ // connects the "raw" data to a a constructor function | ||
}); | ||
QUnit.test("serialize-able", function(){ | ||
var Team = DefineMap.extend({ | ||
id: 'string' | ||
}); | ||
var Teams = DefineList.extend({ | ||
"#": Team | ||
}); | ||
Team.connection = connect([constructor, constructorStore, canMap, canRef, { | ||
getData: function() { | ||
return Promise.resolve({ id: 3, name: "Bears" }); | ||
} | ||
}], | ||
{ Map: Team, List: Teams }); | ||
var Game = DefineMap.extend({ | ||
id: 'string', | ||
teamRef: {type: Team.Ref.type}, | ||
score: "number" | ||
}); | ||
var game = new Game({id: "123", score: 5, teamRef: "321"}); | ||
QUnit.deepEqual( canReflect.serialize(game), {id: "123", score: 5, teamRef: "321"} ); | ||
}); |
@@ -162,2 +162,3 @@ /** | ||
var define = require("can-define"); | ||
var canReflect = require("can-reflect"); | ||
@@ -392,2 +393,5 @@ var makeRef = function(connection){ | ||
}; | ||
canReflect.assignSymbols(Ref.prototype,{ | ||
"can.serialize": Ref.prototype.serialize | ||
}) | ||
@@ -394,0 +398,0 @@ var baseEventSetup = Ref.prototype._eventSetup; |
{ | ||
"name": "can-connect", | ||
"version": "2.0.4", | ||
"version": "2.0.5", | ||
"description": "Data connection middleware and utilities", | ||
@@ -5,0 +5,0 @@ "main": "can-connect.js", |
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
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
515244
12273
0