Nickelback Plays Music

    @extra-set/compare.min
    TypeScript icon, indicating that this package has built-in type declarations

    2.2.11 • Public • Published

    Compares two sets. 📦 😺 🏃 📼 🌔 📜 📰 📘

    Similar: compare, isEqual.

    This is part of package extra-set.

    This is browserified, minified version of @extra-set/compare.
    It is exported as global variable set_compare.
    CDN: unpkg, jsDelivr.


    set.compare(x, y);
    // x: a set
    // y: another set
    // → x=y: 0, otherwise: -ve/+ve
    const set = require("extra-set");
    
    var x = new Set([1, 2]);
    var y = new Set([1, 2, 3]);
    set.compare(x, y);
    // -1
    
    var y = new Set([1, 2]);
    set.compare(x, y);
    // 0
    
    var y = new Set([1, -2]);
    set.compare(x, y);
    // 1


    References

    Install

    npm i @extra-set/compare.min

    DownloadsWeekly Downloads

    0

    Version

    2.2.11

    License

    MIT

    Unpacked Size

    5.1 kB

    Total Files

    7

    Last publish

    Collaborators

    • wolfram77