Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

mrm-core

Package Overview
Dependencies
Maintainers
1
Versions
89
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

mrm-core - npm Package Compare versions

Comparing version 0.3.1 to 0.3.2

2

package.json
{
"name": "mrm-core",
"version": "0.3.1",
"version": "0.3.2",
"description": "Utilities to make tasks for mrm",

@@ -5,0 +5,0 @@ "author": {

@@ -10,2 +10,7 @@ 'use strict';

it('merge() should merge arrays of objects without duplicates', () => {
const result = merge({ _: [{ a: 1 }, { b: 2 }] }, { _: [{ a: 1 }, { c: 3 }] });
expect(result).toEqual({ _: [{ a: 1 }, { b: 2 }, { c: 3 }] });
});
it('merge() should not remove existing array items', () => {

@@ -12,0 +17,0 @@ const result = merge({ _: ['a', 'a', 'b'] }, { _: ['a'] });

'use strict';
const mergeBase = require('webpack-merge');
const difference = require('lodash/difference');
const differenceWith = require('lodash/differenceWith');
const isEqual = require('lodash/isEqual');
const merge = mergeBase({
customizeArray: (a, b) => a.concat(difference(b, a)),
customizeArray: (a, b) => a.concat(differenceWith(b, a, isEqual)),
});
module.exports = merge;
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