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

can-map

Package Overview
Dependencies
Maintainers
10
Versions
87
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

can-map - npm Package Compare versions

Comparing version 3.6.0 to 3.6.1

34

can-map_test.js

@@ -515,1 +515,35 @@ /* jshint asi:true */

});
QUnit.test("Can assign nested properties that are not CanMaps", function(){
var MyType = function() {
this.one = 'one';
this.two = 'two';
this.three = 'three';
};
MyType.prototype[canSymbol.for("can.onKeyValue")] = function(){};
MyType.prototype[canSymbol.for("can.isMapLike")] = true;
var map = new Map({
_legacyAttrBehavior: true,
foo: 'bar',
prop: new MyType()
});
map.attr({
prop: {one: '1', two: '2'}
});
// Did an assign
QUnit.equal(map.attr("prop.one"), "1");
QUnit.equal(map.attr("prop.two"), "2");
QUnit.equal(map.attr("prop.three"), "three");
// An update
map.attr({
prop: {one: 'one', two: 'two'}
}, true);
QUnit.equal(map.attr("prop.one"), "one");
QUnit.equal(map.attr("prop.two"), "two");
QUnit.equal(map.attr("prop.three"), undefined);
});

6

can-map.js

@@ -527,3 +527,7 @@ /* jshint -W079 */

if ( types.isMapLike(curVal) && mapHelpers.canMakeObserve(newVal) ) {
curVal.attr(newVal, remove);
if(remove === true) {
canReflect.updateDeep(curVal, newVal);
} else {
canReflect.assignDeep(curVal, newVal);
}
// Otherwise just set.

@@ -530,0 +534,0 @@ } else if (curVal !== newVal) {

2

dist/amd/bubble.js

@@ -1,2 +0,2 @@

/*can-map@3.4.2#bubble*/
/*can-map@3.6.0#bubble*/
define([

@@ -3,0 +3,0 @@ 'require',

@@ -1,2 +0,2 @@

/*can-map@3.4.2#can-map*/
/*can-map@3.6.0#can-map*/
define([

@@ -282,3 +282,7 @@ 'require',

if (types.isMapLike(curVal) && mapHelpers.canMakeObserve(newVal)) {
curVal.attr(newVal, remove);
if (remove === true) {
canReflect.updateDeep(curVal, newVal);
} else {
canReflect.assignDeep(curVal, newVal);
}
} else if (curVal !== newVal) {

@@ -285,0 +289,0 @@ self.__set(prop, self.__type(newVal, prop), curVal);

@@ -1,2 +0,2 @@

/*can-map@3.4.2#map-helpers*/
/*can-map@3.6.0#map-helpers*/
define([

@@ -3,0 +3,0 @@ 'require',

{
"name": "can-map",
"version": "3.6.0",
"version": "3.6.1",
"description": "Observable Objects",

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

Sorry, the diff of this file is too big to display

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