0.2.4 • Published 6 years ago

object-without v0.2.4

Weekly downloads
2
License
MIT
Repository
github
Last release
6 years ago

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
0.2.4

6 years ago

0.2.3

6 years ago

0.2.2

6 years ago

0.2.1

6 years ago

0.2.0

6 years ago

0.1.3

6 years ago

0.1.2

6 years ago

0.1.1

6 years ago

0.1.0

6 years ago

0.0.7

6 years ago

0.0.6

6 years ago

0.0.5

6 years ago

0.0.4

6 years ago

0.0.3

6 years ago

0.0.2

6 years ago

0.0.1

6 years ago