0.2.1 • Published 12 years ago

repeat-function v0.2.1

Weekly downloads
5
License
BSD
Repository
github
Last release
12 years ago

Repeat a value a number of times. You can also pass a function.

repeat(limit, value);
> repeat(10, 'hi');
['hi', 'hi', 'hi', 'hi', 'hi', 'hi', 'hi', 'hi', 'hi', 'hi']

> repeat(10, Math.random);
[ 0.3722359158564359, 0.2253044811077416, 0.007700880523771048, 0.17186463717371225, 0.4193427243735641, 0.7379662005696446, 0.23550302837975323, 0.9457539631985128, 0.8877920298837125, 0.997513564536348 ]