[go: up one dir, main page]

repeating
DefinitelyTyped icon, indicating that this package has TypeScript declarations provided by the separate @types/repeating package

4.0.0 • Public • Published

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


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.

Dependents (383)

Package Sidebar

Install

npm i repeating

Weekly Downloads

6,102,163

Version

4.0.0

License

MIT

Unpacked Size

4.21 kB

Total Files

4

Last publish

Collaborators

  • sindresorhus