1.1.8 • Published 6 years ago

@extra-object/without v1.1.8

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

Remove specified keys from object (without delete).

Key and key array support added by request @lachenmayer.

const without = require('@extra-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

extra-object

1.1.8

6 years ago

1.1.7

6 years ago

1.1.6

6 years ago

1.1.5

6 years ago

1.1.4

6 years ago

1.1.3

6 years ago

1.1.2

6 years ago

1.1.1

7 years ago

1.1.0

7 years ago

1.0.3

7 years ago

1.0.1

7 years ago

1.0.0

7 years ago