Skip to content
Repeat a string - fast
JavaScript
Branch: master
Clone or download
Fetching latest commit…
Cannot retrieve the latest commit at this time.
Permalink
Type Name Latest commit message Commit time
Failed to load latest commit information.
.github Tidelift tasks May 31, 2019
.editorconfig minor tweaks Apr 11, 2016
.gitattributes init Oct 12, 2014
.gitignore
.travis.yml [BREAKING] switch the arguments order & 2015ify - fixes #6 (#7) Jun 19, 2016
index.js [BREAKING] switch the arguments order & 2015ify - fixes #6 (#7) Jun 19, 2016
license init Oct 12, 2014
package.json 3.0.0 Jun 19, 2016
readme.md Tidelift tasks May 31, 2019
test.js [BREAKING] switch the arguments order & 2015ify - fixes #6 (#7) Jun 19, 2016

readme.md

repeating Build Status

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


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.
You can’t perform that action at this time.