Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/tornqvist/jazzon-repeat
Repeat given value n number of times
https://github.com/tornqvist/jazzon-repeat
Last synced: about 1 month ago
JSON representation
Repeat given value n number of times
- Host: GitHub
- URL: https://github.com/tornqvist/jazzon-repeat
- Owner: tornqvist
- Created: 2015-09-24T12:56:27.000Z (over 9 years ago)
- Default Branch: master
- Last Pushed: 2015-09-24T12:56:55.000Z (over 9 years ago)
- Last Synced: 2024-11-17T17:47:24.938Z (about 1 month ago)
- Language: JavaScript
- Size: 105 KB
- Stars: 2
- Watchers: 3
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# jazzon-repeat
> Repeat given value n number of times
## Installation
```bash
$ npm install --save jazzon-repeat
```## Usage
The helper "repeat" clones (deep) the current state given number of times and puts them in an array.
```javascript
let jazzon = require('jazzon');
let repeat = require('jazzon-repeat');jazzon
.use(repeat())
.compile({ foo: '@{ random(1, 10) | repeat(3) }'})
.then(result => console.log(result)) // => {foo: [7, 7, 7]}
```