New Case Study:See how Anthropic automated 95% of dependency reviews with Socket.Learn More
Socket
Sign inDemoInstall
Socket

can-diff

Package Overview
Dependencies
Maintainers
5
Versions
24
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

can-diff - npm Package Compare versions

Comparing version 1.4.2 to 1.4.3

2

package.json
{
"name": "can-diff",
"version": "1.4.2",
"version": "1.4.3",
"description": "Diffing helpers for can-reflect",

@@ -5,0 +5,0 @@ "homepage": "http://canjs.com",

@@ -6,2 +6,3 @@ var DefineList = require("can-define/list/list");

var SimpleObservable = require("can-simple-observable");
var canReflect = require("can-reflect");

@@ -40,1 +41,28 @@ QUnit.module("can-diff/patcher",{

});
QUnit.test("unbinding unbinds from the list (#13)", function(){
// first with a list
var ListType = DefineList.extend("ListType",{});
var list = new ListType(["a","b"]);
var p1 = new Patcher(list);
var calls = [];
canReflect.onInstanceBoundChange(ListType, function(instance, isBound){
calls.push([instance, isBound]);
});
function handler(){}
p1[canSymbol.for("can.onPatches")](handler);
p1[canSymbol.for("can.offPatches")](handler);
QUnit.deepEqual(calls, [[list, true], [list, false]], "bound and unbound");
calls = [];
var observable = new SimpleObservable(list);
var p2 = new Patcher(observable);
p2[canSymbol.for("can.onPatches")](handler);
p2[canSymbol.for("can.offPatches")](handler);
QUnit.deepEqual(calls, [[list, true], [list, false]], "bound and unbound within observable");
});

@@ -98,2 +98,5 @@

}
if (this.currentList && this.currentList[offPatchesSymbol]) {
this.currentList[offPatchesSymbol](this.onPatchesNotify, "notify");
}
},

@@ -100,0 +103,0 @@ // listen to the list for patches

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