can-map-define
Advanced tools
Comparing version 3.0.5 to 3.0.6
@@ -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 | ||
}); |
@@ -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", |
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
New author
Supply chain riskA new npm collaborator published a version of the package for the first time. New collaborators are usually benign additions to a project, but do indicate a change to the security surface area of a package.
Found 1 instance in 1 package
14
1623
0
75137
6
23
+ Addedcan-list@^3.0.3
+ Addedcan-list@3.2.2(transitive)