Ninja Pumpkin Mutants

    @extra-object/key
    TypeScript icon, indicating that this package has built-in type declarations

    2.2.5 • Public • Published

    Picks an arbitrary key. 🏃 📼 📦 🌔 📒

    Similar: key, keys, has.
    This is part of package extra-object.

    object.key(x, [r]);
    // x: an object
    // r: random seed 0->1
    const object = require('extra-object');
    
    var x = {a: 1, b: 2, c: 3};
    object.key(x);
    // 'c'
    
    object.key(x, 0.5);
    // 'b'

    references

    Install

    npm i @extra-object/key

    DownloadsWeekly Downloads

    1

    Version

    2.2.5

    License

    MIT

    Unpacked Size

    3.25 kB

    Total Files

    9

    Last publish

    Collaborators

    • wolfram77