0.1.3 • Published 6 years ago

iterable-sliceto v0.1.3

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

iterable-sliceto

NPM

Copy part of iterable to array, like Array.slice().

DEPRECATED: Please use iterable-slice instead.

const sliceTo = require('iterable-sliceto');
// sliceTo(<iterable>, [begin=0], [end], [target=[]], [at])
// (positive indexes only for iterable)

sliceTo([3, 4, 4, 5, 4, 5]);
// [3, 4, 4, 5, 4, 5]
sliceTo(new Set([3, 4, 5]), 1);
// [4, 5]
sliceTo(new Set([3, 4, 5]), 1, 2);
// [4]
sliceTo('344545', 2, 5, ['1', '2']);
// ['1', '2', '4', '5', '4']
sliceTo('344545', 2, 5, ['1', '2'], 1);
// ['1', '4', '5', '4']
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.9

6 years ago

0.0.8

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