Neoclassical Programming Multitude

    object-without

    0.2.4 • Public • Published

    object-without

    NOTE: object-without was renamed to @extra-object/without. NPM

    Remove specified keys from object (without delete).

    Key and key array support added by request @lachenmayer.

    const without = require('object-without');
    // without.value(<object>, <key>)
    // without.array(<object>, <key array>)
    // without.set(<object>, <key set>)
    // without(<object>, <key(s)>)
     
    without({'not': '!', 'and': '&', 'nand': '!&'}, new Set(['not', 'and']));
    // {'nand': '!&'} (yay to universal gate)
    without({'not': '!', 'and': '&', 'nand': '!&'}, ['not', 'and', 'and']);
    // {'nand': '!&'} (duplicate keys are fine)
    without({'not': '!', 'and': '&', 'nand': '!&'}, 'nand');
    // {'not': '!', 'and': '&'} (basic gates)
    without({'not': '!', 'and': '&', 'nand': '!&'});
    // ({'not': '!', 'and': '&', 'nand': '!&'}
    without(null, 'nand');
    // null

    Install

    npm i object-without

    DownloadsWeekly Downloads

    2

    Version

    0.2.4

    License

    MIT

    Unpacked Size

    2.46 kB

    Total Files

    3

    Last publish

    Collaborators

    • avatar
    • avatar