Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

can-connect

Package Overview
Dependencies
Maintainers
15
Versions
188
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

can-connect - npm Package Compare versions

Comparing version 2.0.4 to 2.0.5

2

can/map/map.js

@@ -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",

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc