Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/bjarneo/array-append-x
Append an element for every X element in an array.
https://github.com/bjarneo/array-append-x
Last synced: 3 days ago
JSON representation
Append an element for every X element in an array.
- Host: GitHub
- URL: https://github.com/bjarneo/array-append-x
- Owner: bjarneo
- License: mit
- Created: 2015-12-16T19:36:28.000Z (almost 9 years ago)
- Default Branch: master
- Last Pushed: 2015-12-16T19:54:15.000Z (almost 9 years ago)
- Last Synced: 2024-10-13T07:54:07.843Z (about 1 month ago)
- Language: JavaScript
- Size: 2.93 KB
- Stars: 0
- Watchers: 3
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
array-append-x
======What
------
Append an element for every X element in an array.Installation
------
```
$ npm install --save array-append-x
```Usage
------
```javascript
var arrayAppendX = require('array-append-x');
var num = [0, 0, 0, 0, 0, 0, 0];console.log(arrayAppendX(num, 1, 4));
// Output:
[0, 0, 0, 1, 0, 0, 0, 1, 0]
```Test
------
```
npm test
```Contribution
------
Contributions are appreciated.License
------
MIT-licensed. See LICENSE.