1.0.0 • Published 7 years ago
@kingjs/descriptor.object.remove v1.0.0
@kingjs/descriptor.object.remove
Returns a descriptor with a property removed.
Usage
Remove the property 'x' like this:
var remove = require('@kingjs/descriptor.object.remove');
var descriptor = { x:0 };
remove.call(descriptor, 'x');result:
{ }API
declare function remove(
this: Descriptor,
key: string
): DescriptorInterfaces
Descriptor: see @kingjs/descriptor
Parameters
this: The descriptor from which propertykeywill be removed.key: The property to be removed.
Returns
Returns a descriptor with property key removed. A copy is returned if the descriptor has an inherited property key or the descriptor is frozen. If this is an array then subsequent values are shifted left over the removed index.
Install
With npm installed, run
$ npm install @kingjs/descriptor.object.removeLicense
MIT
1.0.0
7 years ago