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

can-simple-map

Package Overview
Dependencies
Maintainers
11
Versions
51
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

can-simple-map - npm Package Compare versions

Comparing version 4.1.1 to 4.2.0

test/test.html

81

can-simple-map.js

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

"use strict";
var Construct = require("can-construct");

@@ -56,14 +57,24 @@ var eventQueue = require("can-event-queue/map/map");

//!steal-remove-start
if (typeof this._log === "function") {
this._log(prop, value, old);
if (process.env.NODE_ENV !== 'production') {
if (typeof this._log === "function") {
this._log(prop, value, old);
}
}
//!steal-remove-end
var dispatched = {
keyChanged: !had ? prop : undefined,
type: prop
};
//!steal-remove-start
if (process.env.NODE_ENV !== 'production') {
dispatched = {
keyChanged: !had ? prop : undefined,
type: prop,
reasonLog: [ canReflect.getName(this) + "'s", prop, "changed to", value, "from", old ],
};
}
//!steal-remove-end
this.dispatch({
keyChanged: !had ? prop : undefined,
type: prop,
//!steal-remove-start
reasonLog: [ canReflect.getName(this) + "'s", prop, "changed to", value, "from", old ],
//!steal-remove-end
}, [value, old]);
this.dispatch(dispatched, [value, old]);
}

@@ -102,6 +113,7 @@

//!steal-remove-start
var quoteString = function quoteString(x) {
return typeof x === "string" ? JSON.stringify(x) : x;
};
if (process.env.NODE_ENV !== 'production') {
var quoteString = function quoteString(x) {
return typeof x === "string" ? JSON.stringify(x) : x;
};
}
var meta = ensureMeta(this);

@@ -132,3 +144,3 @@ meta.allowedLogKeysSet = meta.allowedLogKeysSet || new Set();

canReflect.assignSymbols(SimpleMap.prototype,{
var simpleMapProto = {
// -type-

@@ -143,2 +155,3 @@ "can.isMapLike": true,

"can.deleteKeyValue": function(prop) {
var dispatched;
if( this._data.hasOwnProperty(prop) ) {

@@ -149,13 +162,22 @@ var old = this._data[prop];

//!steal-remove-start
if (typeof this._log === "function") {
this._log(prop, undefined, old);
if (process.env.NODE_ENV !== 'production') {
if (typeof this._log === "function") {
this._log(prop, undefined, old);
}
}
//!steal-remove-end
this.dispatch({
dispatched = {
keyChanged: prop,
type: prop,
//!steal-remove-start
reasonLog: [ canReflect.getName(this) + "'s", prop, "deleted", old ],
//!steal-remove-end
}, [undefined, old]);
type: prop
};
//!steal-remove-start
if (process.env.NODE_ENV !== 'production') {
dispatched = {
keyChanged: prop,
type: prop,
reasonLog: [ canReflect.getName(this) + "'s", prop, "deleted", old ]
};
}
//!steal-remove-end
this.dispatch(dispatched, [undefined, old]);
}

@@ -189,10 +211,13 @@ },

return undefined;
},
}
};
//!steal-remove-start
"can.getName": function() {
//!steal-remove-start
if (process.env.NODE_ENV !== 'production') {
simpleMapProto["can.getName"] = function() {
return canReflect.getName(this.constructor) + "{}";
},
//!steal-remove-end
});
};
}
//!steal-remove-end
canReflect.assignSymbols(SimpleMap.prototype,simpleMapProto);

@@ -199,0 +224,0 @@ // Setup other symbols

{
"name": "can-simple-map",
"version": "4.1.1",
"version": "4.2.0",
"description": "A performant live-bound map",

@@ -61,4 +61,4 @@ "homepage": "https://canjs.com/doc/can-simple-map.html",

"steal-tools": "^1.1.2",
"testee": "^0.7.0"
"testee": "^0.8.0"
}
}
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