Neoanthropic Preternatural Murmurings
    Wondering what’s next for npm?Check out our public roadmap! »

    flat-zip
    TypeScript icon, indicating that this package has built-in type declarations

    1.0.1 • Public • Published

    flat-zip

    Concats arrays but does so like a zipper instead of appending them. Like lodash.zip + lodash.flat, plus a length limit

    Install

    npm install flat-zip
    import {flatZip} from 'flat-zip';
    const {flatZip} = require('flat-zip');

    Usage

    flatZip([
        ['a', 'b', 'c'],
        ['', '฿'],
        [100, 200, 300, 400, 500],
    ]);
    // -> ['a', '€', 100, 'b', '฿', 200, 'c', 300, 400, 500]

    With a length limit:

    flatZip([
        ['a', 'b', 'c'],
        ['', '฿'],
        [100, 200, 300, 400, 500],
    ], 4);
    // -> ['a', '€', 100, 'b']

    License

    MIT © Federico Brigante

    Install

    npm i flat-zip

    DownloadsWeekly Downloads

    311

    Version

    1.0.1

    License

    MIT

    Unpacked Size

    4.88 kB

    Total Files

    7

    Last publish

    Collaborators

    • avatar