Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/aurimasniekis/array-intersperse
Extention for Array to add method `intersperse` for adding elements in between elements in array.
https://github.com/aurimasniekis/array-intersperse
Last synced: about 2 months ago
JSON representation
Extention for Array to add method `intersperse` for adding elements in between elements in array.
- Host: GitHub
- URL: https://github.com/aurimasniekis/array-intersperse
- Owner: aurimasniekis
- License: mit
- Created: 2017-01-16T13:42:04.000Z (almost 8 years ago)
- Default Branch: master
- Last Pushed: 2017-01-16T13:51:09.000Z (almost 8 years ago)
- Last Synced: 2024-09-30T09:22:19.735Z (4 months ago)
- Language: JavaScript
- Size: 2.93 KB
- Stars: 0
- Watchers: 2
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# array-intersperse
[![Latest Version](https://img.shields.io/github/release/aurimasniekis/array-intersperse.svg?style=flat-square)]
(https://github.com/aurimasniekis/array-intersperse/releases)
[![Software License](https://img.shields.io/badge/license-MIT-brightgreen.svg?style=flat-square)]
(LICENSE)
[![Build Status](https://img.shields.io/travis/aurimasniekis/array-intersperse.svg?style=flat-square)]
(https://travis-ci.org/aurimasniekis/array-intersperse)
[![Total Downloads](https://img.shields.io/npm/dt/array-intersperse.svg?style=flat-square)](https://www.npmjs.com/package/array-intersperse)Extention for Array to add method `intersperse` for adding elements in between elements in array.
## Installation
```bash
$ npm install --save array-intersperse
```## Example
```js
require('array-intersperse');
var arr = [1, 2, 3].intersperse('a');console.log(arr) // [1, 'a', 2, 'a', 3]
```