0.1.2 • Published 6 years ago

array-repeatto v0.1.2

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

array-repeatto

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

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

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

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