1.0.3 • Published 6 years ago
@kingjs/descriptor.nested.array.scorch v1.0.3
@kingjs/descriptor.nested.array.scorch
Clears an array tree of undefined
values.
Usage
Scorch an array tree of values like this:
'use strict';
var values = [
undefined,
['tiger'],
[undefined]
]
scorch(values);
values;
result:
[ [ 'tiger'] [ ] ]
API
declare function scorch(
tree: NestedDescriptor
): void
Interfaces
NestedArray
: see @kingjs/descriptor/nested/array
Parameters
tree
: The array tree whose nodes will be purged of properties with undefined values.
Install
With npm installed, run
$ npm install @kingjs/descriptor.nested.array.freeze
License
MIT