New Case Study:See how Anthropic automated 95% of dependency reviews with Socket.Learn More
Socket
Sign inDemoInstall
Socket

array-interweave

Package Overview
Dependencies
Maintainers
1
Versions
1
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

array-interweave

Produce a new array from two source arrays with alternating values from each source array

  • 1.0.0
  • latest
  • Source
  • npm
  • Socket score

Version published
Weekly downloads
4
Maintainers
1
Weekly downloads
 
Created
Source

array-interweave

js-standard-style Build Status Code Climate codecov.io Dependency Status devDependency Status

NPM

Produce a new array from two source arrays with alternating values from each source array.

Installation

$ npm install array-interweave --save

Usage

const interweave = require('array-interweave')
const sourceA = [1, 2, 3, 4, 5]
const sourceB = ['A', 'B', 'C']
const mergedResult = interweave(sourceA, sourceB)
// => [1, 'A', 2, 'B', 3, 'C', 4, 5]
const interweave = require('array-interweave')
const sourceA = [0x55, {foo: 'bar'}, 'apples']
const sourceB = [1, 2, 3, 4, 5]
const mergedResult = interweave(sourceA, sourceB)
// => [0x55, 1, {foo: 'bar'}, 2, 'apples', 3, 4, 5]

Tests

iUnit tests use Mocha, Unit.js, and Istanbul

$ npm run test
$ npm run test-html-cov # Will open HTML coverage report in Google Chrome on OSX

License

MIT

FAQs

Package last updated on 28 Jan 2016

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc