set
Sets multiple properties on a map instance or a property that wasn't predefined.
Deprecated 3.10.1
Using .set with {Object} props has been deprecated in favour of assign and update
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.
Parameters
- props
{Object}:A collection of key-value pairs to set. If any properties already exist on the map, they will be overwritten.
- removeProps
{Boolean}:Whether to set keys not present in
propstoundefined.
map.set(propName, value)
Assigns value to a property on this map instance called propName. This will define the property if it hasn't already been predefined.
Parameters
- propName
{String}:The property to set.
- value
{*}:The value to assign to
propName.