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

can-define

Package Overview
Dependencies
Maintainers
17
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 2.6.3 to 2.6.4

17

map/map-test.js

@@ -1539,1 +1539,18 @@ var QUnit = require("steal-qunit");

});
QUnit.test("setup should be called (#395)", function(){
var calls = [];
var Base = DefineMap.extend("Base",{
setup: function(attrs) {
calls.push(this);
return DefineMap.prototype.setup.apply(this, arguments);
}
});
var Super = Base.extend("Super",{});
var base = new Base();
var supa = new Super();
QUnit.deepEqual(calls,[base, supa], "setup called");
});

20

map/map.js

@@ -76,2 +76,11 @@ "use strict";

var sealedSetup = function(props){
define.setup.call(
this,
props || {},
this.constructor.seal
);
};
var DefineMap = Construct.extend("DefineMap",{

@@ -90,9 +99,6 @@ setup: function(base){

}
define.defineConfigurableAndNotEnumerable(prototype, "setup", function(props){
define.setup.call(
this,
props || {},
this.constructor.seal
);
});
// If someone provided their own setup, we call that.
if(prototype.setup === DefineMap.prototype.setup) {
define.defineConfigurableAndNotEnumerable(prototype, "setup", sealedSetup);
}

@@ -99,0 +105,0 @@ var _computedGetter = Object.getOwnPropertyDescriptor(prototype, "_computed").get;

{
"name": "can-define",
"version": "2.6.3",
"version": "2.6.4",
"description": "Create observable objects with JS dot operator compatibility",

@@ -5,0 +5,0 @@ "main": "can-define.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