Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/component/repeat
Repeat strings efficiently
https://github.com/component/repeat
Last synced: 13 days ago
JSON representation
Repeat strings efficiently
- Host: GitHub
- URL: https://github.com/component/repeat
- Owner: component
- Created: 2014-01-31T12:23:23.000Z (almost 11 years ago)
- Default Branch: master
- Last Pushed: 2014-01-31T12:31:15.000Z (almost 11 years ago)
- Last Synced: 2024-05-08T17:06:46.678Z (8 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