Narcissistic Project Managers

    @extra-iterable/cut-at.min
    TypeScript icon, indicating that this package has built-in type declarations

    2.5.22 • Public • Published

    Breaks iterable at given indices. 📦 😺 🏃 📼 🌔 📜 📰 📘

    Alternatives: cut, cutRight, cutAt, cutAtRight.
    Similar: cut, split, group.

    This is part of package extra-iterable.

    This is browserified, minified version of @extra-iterable/cut-at.
    It is exported as global variable iterable_cutAt.
    CDN: unpkg, jsDelivr.


    iterable.cutAt(x, is);
    // x:  an iterable
    // is: split indices (sorted)
    const iterable = require("extra-iterable");
    
    var x = [1, 2, 3, 4, 5];
    [...iterable.cutAt(x, [1, 3])];
    // [ [ 1 ], [ 2, 3 ], [ 4, 5 ] ]
    
    [...iterable.cutAt(x, [0, 4])];
    // [ [], [ 1, 2, 3, 4 ], [ 5 ] ]


    References

    Install

    npm i @extra-iterable/cut-at.min

    DownloadsWeekly Downloads

    4

    Version

    2.5.22

    License

    MIT

    Unpacked Size

    5.83 kB

    Total Files

    7

    Last publish

    Collaborators

    • wolfram77