can.deleteKeyValue
Defines a function that deletes one of an object's named properties.
@@can.deleteKeyValue( key )
The can.deleteKeyValue
symbol points to a Map-like object's property removal function, which removes the object's property with the supplied key. This is only applicable to objects where keyed properties are relevant (like maps).
var map = {
removeKey: function (key) {
delete this[key];
}
}
map[canSymbol.for('can.deleteKeyValue')] = map.removeKey;
Parameters
- key
{String}
:the key to remove from the object