repeating ![Build Status](https://camo.githubusercontent.com/89221e0654c17a36a43d56d7d1819e02ca0bb749d2e4e81e811a7d390075ef70/68747470733a2f2f7472617669732d63692e6f72672f73696e647265736f726875732f726570656174696e672e7376673f6272616e63683d6d6173746572)
Repeat a string - fast
This module is moot now. Just use String#repeat()
.
Install
$ npm install repeating
Usage
const repeating = require('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
Get professional support for this package with a Tidelift subscription
Tidelift helps make open source sustainable for maintainers while giving companies
assurances about security, maintenance, and licensing for their dependencies.
Tidelift helps make open source sustainable for maintainers while giving companies
assurances about security, maintenance, and licensing for their dependencies.