0.1.7 • Published 7 years ago

iterable-compact v0.1.7

Weekly downloads
2
License
MIT
Repository
github
Last release
7 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

7 years ago

0.1.6

7 years ago

0.1.5

7 years ago

0.1.4

7 years ago

0.1.3

8 years ago

0.1.2

8 years ago

0.1.1

8 years ago

0.1.0

8 years ago

0.0.7

8 years ago

0.0.6

8 years ago

0.0.5

8 years ago

0.0.4

8 years ago

0.0.3

8 years ago

0.0.2

8 years ago

0.0.1

8 years ago