@kingjs/descriptor.remove

1.0.3 • Public • Published

@kingjs/descriptor.remove

Returns a descriptor with a property removed.

Usage

Remove the property 'x' like this:

var remove = require('@kingjs/descriptor.remove');

var descriptor = { x:0 };
remove.call(descriptor, 'x');

result:

{ }

API

declare function remove(
  this: Descriptor,
  key: string
): Descriptor

Interfaces

Parameters

  • this: The descriptor from which property key will 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.remove

License

MIT

Analytics

Readme

Keywords

none

Package Sidebar

Install

npm i @kingjs/descriptor.remove

Weekly Downloads

0

Version

1.0.3

License

MIT

Unpacked Size

3.24 kB

Total Files

4

Last publish

Collaborators

  • kingces95