0.1.6 • Published 6 years ago

iterable-repeat v0.1.6

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

iterable-repeat

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

Repeat iterable n times, like String.repeat().

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

repeat(new Set(['a', 'b']), 3);
// ['a', 'b', 'a', 'b', 'a', 'b']
repeat(['a', 'b', 'c', 'd'], 2, 1);
// ['b', 'c', 'd', 'b', 'c', 'd']
repeat('abcd', 2, 1, 3);
// ['b', 'c', 'b', 'c']
repeat('abcd', 2, 1, 3, ['z', 'y']);
// ['z', 'y', 'b', 'c', 'b', 'c']
repeat('abcd', 2, 1, 3, ['z', 'y'], 1);
// ['z', 'b', 'c', 'b', 'c']
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.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