@extra-map/scan-until.min
    TypeScript icon, indicating that this package has built-in type declarations

    2.2.15 • Public • Published

    Finds key of first entry passing a test. 📦 😺 🏃 📼 🌔 📜 📰 📘

    Alternatives: scanWhile, scanUntil.

    This is part of package extra-map.

    This is browserified, minified version of @extra-map/scan-until.
    It is exported as global variable map_scanUntil.
    CDN: unpkg, jsDelivr.


    map.scanUntil(x, ft);
    // x:  a map
    // ft: test function (v, k, x)
    const map = require("extra-map");
    
    var x = new Map([["a", 1], ["b", 2], ["c", 3], ["d", 2]]);
    map.scanUntil(x, v => v % 2 === 0);
    // "b"                       ^
    
    map.scanUntil(x, v => v % 8 === 0);
    // undefined


    References

    Install

    npm i @extra-map/scan-until.min

    DownloadsWeekly Downloads

    1

    Version

    2.2.15

    License

    MIT

    Unpacked Size

    5.11 kB

    Total Files

    7

    Last publish

    Collaborators

    • avatar