1.0.5 • Published 6 years ago

@kingjs/descriptor.scorch v1.0.5

Weekly downloads
1
License
MIT
Repository
github
Last release
6 years ago

@kingjs/descriptor.scorch

Deletes properties with undefined value.

Usage

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

var source = { a: undefined };
var result = scorch.call(source);
'a' in result;

result:

`false`

API

declare function scorch(
  this: any
): any

Parameters

  • this: Object whose properties with undefined values are to be deleted.

Returns

Returns this after properties with undefined value have been deleted.

Remarks

If this is an array then undefined values will be spliced out of the array.

Install

With npm installed, run

$ npm install @kingjs/descriptor.scorch

License

MIT

Analytics