repeating
v4.0.0
Published
Repeat a string - fast
Downloads
26,755,737
Maintainers
Readme
repeating
Repeat a string - fast
This module is moot now. Just use String#repeat()
.
Install
$ npm install repeating
Usage
import repeating from 'repeating';
repeating(5);
//=> ' '
repeating(100, 'unicorn ');
//=> 'unicorn unicorn unicorn unicorn unicorn unicorn unicorn unicorn unicorn unicorn unicorn unicorn unicorn unicorn unicorn unicorn unicorn unicorn unicorn unicorn unicorn unicorn unicorn unicorn unicorn unicorn unicorn unicorn unicorn unicorn unicorn unicorn unicorn unicorn unicorn unicorn unicorn unicorn unicorn unicorn unicorn unicorn unicorn unicorn unicorn unicorn unicorn unicorn unicorn unicorn unicorn unicorn unicorn unicorn unicorn unicorn unicorn unicorn unicorn unicorn unicorn unicorn unicorn unicorn unicorn unicorn unicorn unicorn unicorn unicorn unicorn unicorn unicorn unicorn unicorn unicorn unicorn unicorn unicorn unicorn unicorn unicorn unicorn unicorn unicorn unicorn unicorn unicorn unicorn unicorn unicorn unicorn unicorn unicorn unicorn unicorn unicorn unicorn unicorn unicorn '
API
repeating(count, string?)
count
Type: number
Times the string
should be repeated.
string
Type: string
Default: ' '
String to repeat.
Related
- repeating-cli - CLI for this module
- indent-string - Indent each line in a string