Ecosyste.ms: Awesome

An open API service indexing awesome lists of open source software.

Awesome Lists | Featured Topics | Projects

https://github.com/component/repeat

Repeat strings efficiently
https://github.com/component/repeat

Last synced: 13 days ago
JSON representation

Repeat strings efficiently

Awesome Lists containing this project

README

        

# repeat

Repeat strings efficiently. Originally from the [escodegen](https://github.com/Constellation/escodegen) project.

## Installation

Install with [component(1)](http://component.io):

$ component install component/repeat

## API

### `repeat(str, n)`

Repeat the `str` string `n` times

```js
repeat('ho', 3) // hohoho
```

## Test

```js
npm install component-test
make test
```

## License

MIT