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

can-map-define

Package Overview
Dependencies
Maintainers
8
Versions
34
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

can-map-define - npm Package Compare versions

Comparing version 3.0.5 to 3.0.6

19

can-map-define_test.js

@@ -1495,1 +1495,20 @@ /* jshint asi: false */

});
test("value function not set on constructor defaults", function(){
var MyMap = CanMap.extend({
define: {
propA: {
value: function(){
return 1;
}
}
}
});
var map = new MyMap();
equal(MyMap.defaults.propA, undefined, 'Generator function does not result in property set on defaults');
notEqual(MyMap.defaultGenerators.propA, undefined, 'Generator function set on defaultGenerators');
equal(map.attr("propA"), 1, 'Instance value set properly'); //this is mainly so that CI doesn't complain about unused variable
});

3

can-map-define.js

@@ -9,2 +9,3 @@ var dev = require('can-util/js/dev/dev');

var compute = require('can-compute');
require('can-list');

@@ -73,3 +74,3 @@ var define = {}; // jshint ignore:line

CanMap.prototype._setupDefaults = function(obj) {
var defaults = oldSetupDefaults.call(this),
var defaults = extend({},oldSetupDefaults.call(this)),
propsCommittedToAttr = {},

@@ -76,0 +77,0 @@ Map = this.constructor,

{
"name": "can-map-define",
"version": "3.0.5",
"version": "3.0.6",
"description": "Define rich attribute behavior",

@@ -40,2 +40,3 @@ "homepage": "https://canjs.com",

"can-event": "^3.0.1",
"can-list": "^3.0.3",
"can-map": "^3.0.3",

@@ -49,3 +50,2 @@ "can-util": "^3.0.13",

"can-fixture": "^1.0.10",
"can-list": "^3.0.1",
"can-model": "^3.0.0-pre.1",

@@ -52,0 +52,0 @@ "can-route": "^3.0.5",

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