Launch Week Day 1: Socket for Jira Is Now Available.Learn More
Socket
Book a DemoSign in
Socket

array-merge-equal

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-merge-equal

Merge second array into the first array and overwrite equal elements

latest
Source
npmnpm
Version
1.0.0
Version published
Maintainers
1
Created
Source

array-merge-equal

Merge second array into the first array and overwrite equal elements

Build Status

Usage

npm install array-merge-equal
var mergeEqual = require('array-merge-equal');

mergeEqual([
  { v: 1, i: 1 },
  { v: 2, i: 2 },
  { v: 3, i: 3 }
], [
  { v: 1, i: 4 },
  { v: 5, i: 5 }
], function (a, b) { return a.v === b.v; });

/* [
  { v: 1, i: 4 },
  { v: 2, i: 2 },
  { v: 3, i: 3 },
  { v: 5, i: 5 }
] */

API

mergeEqual(array1, array2, equalilyFunction);

FAQs

Package last updated on 04 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