0.1.7 • Published 6 years ago

iterable-compact v0.1.7

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

iterable-compact

NOTE: iterable-compact was renamed to @extra-iterable/compact. NPM

Remove falsy values from iterable, like _.compact().

const compact = require('iterable-compact');
// compact(<iterable>, [begin=0], [end], [target=[]], [at])

compact(new Set([7, 2, null, 1, 0, undefined]));
// [7, 2, 1]
compact([7, 2, null, 1, 0, undefined], 1);
// [2, 1]
compact([7, 2, null, 1, 0, undefined], 1, 3);
// [2]
compact([7, 2, null, 1, 0, undefined], 1, 3, [9, 8]);
// [9, 8, 2]
compact([7, 2, null, 1, 0, undefined], 1, 3, [9, 8], 1);
// [9, 2]
0.1.7

6 years ago

0.1.6

6 years ago

0.1.5

6 years ago

0.1.4

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