@kingjs/descriptor.nested.array.to-array

1.0.5 • Public • Published

@kingjs/descriptor.nested.array.to-array

Returns an array values found in an array tree.

Usage

Return an array of pet names like this:

var toArray = require('@kingjs/descriptor.nested.array.to-array');

toArray([
  'a', [
    'b', [
      'c'
    ], 'd'
  ], 'e'
]);

result:

[ 'a', 'b', 'c', 'd', 'e' ]

API

declare function toArray(
  tree: NestedArray,
): array

Interfaces

Parameters

  • tree: An array tree.

Returns

Returns an array of values or null if no values are found.

Install

With npm installed, run

$ npm install @kingjs/descriptor.nested.array.to-array

License

MIT

Analytics

Readme

Keywords

none

Package Sidebar

Install

npm i @kingjs/descriptor.nested.array.to-array

Weekly Downloads

0

Version

1.0.5

License

MIT

Unpacked Size

3.15 kB

Total Files

4

Last publish

Collaborators

  • kingces95