https://github.com/component/repeat
Repeat strings efficiently
https://github.com/component/repeat
Last synced: 3 months ago
JSON representation
Repeat strings efficiently
- Host: GitHub
- URL: https://github.com/component/repeat
- Owner: component
- Created: 2014-01-31T12:23:23.000Z (over 11 years ago)
- Default Branch: master
- Last Pushed: 2014-01-31T12:31:15.000Z (over 11 years ago)
- Last Synced: 2025-02-08T18:29:05.799Z (5 months ago)
- Language: JavaScript
- Homepage:
- Size: 121 KB
- Stars: 3
- Watchers: 10
- Forks: 1
- Open Issues: 0
-
Metadata Files:
- Readme: Readme.md
- Changelog: History.md
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