Nefariously Programmed Mecha

    slim-array

    1.0.1 • Public • Published

    slim-array

    Flatten the nested array

    Install

    $ npm install --save slim-array

    Examples

    var slim = require('slim-array');
     
    console.log(slim([1, 2, 3, [4, 5, 6, [7, 8, 9]]]));
    // -> [ 1, 2, 3, 4, 5, 6, 7, 8, 9 ]
     
    console.log(slim("wrong args type"));
    // -> wrong args type

    Usage

    require('slim-array')(array)

    Arguments:

    • array: A nested array
    • If wrong argument is passed insted of array then it throws an error

    Returns: Returns a single slim array from a nested array.

    License

    © 2016 vikram. MIT License

    Install

    npm i slim-array

    DownloadsWeekly Downloads

    0

    Version

    1.0.1

    License

    ISC

    Last publish

    Collaborators

    • avatar