0.1.2 • Published 7 years ago

array-repeatto v0.1.2

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

7 years ago

0.1.1

7 years ago

0.1.0

7 years ago

0.0.9

7 years ago

0.0.8

7 years ago

0.0.7

7 years ago

0.0.6

7 years ago

0.0.5

7 years ago

0.0.4

7 years ago

0.0.3

7 years ago

0.0.2

7 years ago

0.0.1

7 years ago