# repeating

> Repeat a string - fast

Latest version **4.0.0** (published 2021-05-03) · MIT license · 0 weekly downloads

## Install

```sh
npm install repeating
pnpm add repeating
yarn add repeating
bun add repeating
```

## Health

**Score 28/100 (F)** — status: abandoned.

Positive: has types package; esm support; no vulnerabilities; high quality score.

Warnings: low downloads.

Negative: abandoned; low maintenance score.

## Facts

| | |
|---|---|
| Version | 4.0.0 |
| Published | 2021-05-03 |
| First published | 2014-10-12 |
| Weekly downloads | 0 |
| License | MIT |
| TypeScript types | separate (@types/repeating) |
| Module format | ESM |
| Node | >=12 |
| Dependencies | 0 |
| Unpacked size | 4.1 KB |
| Known vulnerabilities | 0 |
| Install scripts | no |
| GitHub stars | 35 |
| Author | Sindre Sorhus |
| Maintainers | sindresorhus |
| Keywords | repeat, string, repeating, text, fill, pad |

## Links

- npm: https://www.npmjs.com/package/repeating
- Repository: https://github.com/sindresorhus/repeating
- Homepage: https://github.com/sindresorhus/repeating#readme
- Issues: https://github.com/sindresorhus/repeating/issues
- Funding: https://github.com/sponsors/sindresorhus
- npm.io page: https://npm.io/package/repeating

## Alternatives

- [@mce/gif](https://npm.io/package/@mce/gif.md) — 2.6K weekly downloads
- [cleanse](https://npm.io/package/cleanse.md) — 173 weekly downloads
- [str](https://npm.io/package/str.md) — 127 weekly downloads
- [naming](https://npm.io/package/naming.md) — 95 weekly downloads
- [tap-telco-api](https://npm.io/package/tap-telco-api.md) — 19 weekly downloads

## Recent versions

- 4.0.0 (latest) — 2021-05-03
- 3.0.0 — 2016-06-19
- 2.0.1 — 2016-04-11
- 2.0.0 — 2015-08-21
- 1.1.3 — 2015-05-26
- 1.1.2 — 2015-02-16
- 1.1.1 — 2014-12-22
- 1.1.0 — 2014-10-14
- 1.0.1 — 2014-10-12
- 1.0.0 — 2014-10-12

## README

# repeating

> Repeat a string - fast

**This module is moot now. Just use [`String#repeat()`](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/String/repeat).**

## Install

```
$ npm install repeating
```

## Usage

```js
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](https://github.com/sindresorhus/repeating-cli) - CLI for this module
- [indent-string](https://github.com/sindresorhus/indent-string) - Indent each line in a string

---

<div align="center">
	<b>
		<a href="https://tidelift.com/subscription/pkg/npm-repeating?utm_source=npm-repeating&utm_medium=referral&utm_campaign=readme">Get professional support for this package with a Tidelift subscription</a>
	</b>
	<br>
	<sub>
		Tidelift helps make open source sustainable for maintainers while giving companies<br>assurances about security, maintenance, and licensing for their dependencies.
	</sub>
</div>

---
_Source: https://npm.io/package/repeating · Machine-readable twin of the npm.io package page. Health data is recomputed on every publish._
