can-define
Advanced tools
Comparing version 2.3.6 to 2.3.7
@@ -235,4 +235,6 @@ var Construct = require("can-construct"); | ||
* | ||
* @description Sets an item or property or properties on a list. | ||
* @deprecated {3.10.1} Using .set with {Object} `props` has been deprecated in favour of `assign` and `update` | ||
* | ||
* @description Sets an item or property or items or properties on a list. | ||
* | ||
* @signature `list.set(prop, value)` | ||
@@ -253,2 +255,15 @@ * | ||
* | ||
* @signature `list.set(newProps)` | ||
* | ||
* Updates the properties on the list with `newProps`. | ||
* | ||
* ```js | ||
* var list = new DefineList(["A","B"]); | ||
* list.set({count: 1000, skip: 2}); | ||
* list.get("count") //-> 1000 | ||
* ``` | ||
* | ||
* @param {Object} newProps An object of properties and values to set on the list. | ||
* @return {can-define/list/list} The list instance. | ||
* | ||
* @signature `list.set(index, value)` | ||
@@ -255,0 +270,0 @@ * |
@@ -177,4 +177,19 @@ "use strict"; | ||
* | ||
* @description Sets a property that wasn't predefined. | ||
* @deprecated {3.10.1} Passing an {Object} to `.set` has been deprecated in favor of [can-define/map/map.prototype.assign] or [can-define/map/map.prototype.update]. `map.set(propName, value)` is _not_ deprecated. | ||
* | ||
* @description Sets multiple properties on a map instance or a property that wasn't predefined. | ||
* | ||
* @signature `map.set(props [,removeProps])` | ||
* | ||
* Assigns each value in `props` to a property on this map instance named after the | ||
* corresponding key in `props`, effectively merging `props` into the Map. If `removeProps` is true, properties not in | ||
* `props` will be set to `undefined`. | ||
* | ||
* @param {Object} props A collection of key-value pairs to set. | ||
* If any properties already exist on the map, they will be overwritten. | ||
* | ||
* @param {Boolean} [removeProps=false] Whether to set keys not present in `props` to `undefined`. | ||
* | ||
* @return {can-define/map/map} The map instance for chaining. | ||
* | ||
* @signature `map.set(propName, value)` | ||
@@ -181,0 +196,0 @@ * |
{ | ||
"name": "can-define", | ||
"version": "2.3.6", | ||
"version": "2.3.7", | ||
"description": "Create observable objects with JS dot operator compatibility", | ||
@@ -5,0 +5,0 @@ "main": "can-define.js", |
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
304910
7275