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

can-define

Package Overview
Dependencies
Maintainers
4
Versions
208
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

can-define - npm Package Compare versions

Comparing version 0.7.20 to 0.7.21

4

list/list-test.js

@@ -247,3 +247,3 @@ "use strict";

});
sliced.getValueAndBind();
sliced.start();

@@ -257,3 +257,3 @@ var joined = new Observation(function(){

});
joined.getValueAndBind();
joined.start();

@@ -260,0 +260,0 @@

@@ -84,3 +84,3 @@ "use strict";

});
oi.getValueAndBind();
oi.start();

@@ -148,3 +148,3 @@ map.set("foo","bar");

});
oi.getValueAndBind();
oi.start();

@@ -170,3 +170,3 @@ map.set({a: 1, b: 2});

});
oi.getValueAndBind();
oi.start();

@@ -238,1 +238,12 @@ map.set("a", 1);

});
QUnit.test("get will not create properties", function(){
var method = function(){};
var MyMap = DefineMap.extend({
method: method
});
var m = new MyMap();
m.get("foo");
QUnit.equal(m.get("method"), method);
});

@@ -139,4 +139,3 @@ var Construct = require("can-construct");

*
* Get a single property on a DefineMap instance. If the property is not previously defined and
* the object is not [can-define/map/map.seal sealed], it will be dynamically added.
* Get a single property on a DefineMap instance.
*

@@ -156,4 +155,9 @@ * `.get(propName)` only should be used when reading properties that might not have been defined yet, but

if(arguments.length) {
defineHelpers.defineExpando(this, prop);
return this[prop];
if(prop in this || Object.isSealed(this)) {
return this[prop];
} else {
Observation.add(this, prop);
return this[prop];
}
} else {

@@ -160,0 +164,0 @@ return defineHelpers.serialize(this, 'get', {});

{
"name": "can-define",
"version": "0.7.20",
"version": "0.7.21",
"description": "Like can.Map, but without the .attr method.",

@@ -5,0 +5,0 @@ "main": "can-define.js",

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