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

@boost/common

Package Overview
Dependencies
Maintainers
1
Versions
53
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@boost/common - npm Package Compare versions

Comparing version 2.2.2 to 2.3.0

lib/helpers/deepMerge.d.ts

12

CHANGELOG.md

@@ -6,2 +6,14 @@ # Change Log

## 2.3.0 - 2020-10-15
#### 🚀 Updates
- Add `deepMerge` helper. ([93659b8](https://github.com/milesj/boost/commit/93659b8))
**Note:** Version bump only for package @boost/common
### 2.2.2 - 2020-10-08

@@ -8,0 +20,0 @@

1

lib/helpers/index.d.ts
export { default as createBlueprint } from './createBlueprint';
export { default as deepFreeze } from './deepFreeze';
export { default as deepMerge } from './deepMerge';
export { default as formatMs } from './formatMs';

@@ -4,0 +5,0 @@ export { default as instanceOf } from './instanceOf';

@@ -586,2 +586,29 @@ 'use strict';

function merge(prev, next) {
const base = prev;
Object.entries(next).forEach(([key, value]) => {
const prevValue = base[key];
if (isObject(prevValue) && isObject(value)) {
base[key] = merge({ ...prevValue
}, value);
} else if (Array.isArray(prevValue) && Array.isArray(value)) {
base[key] = merge([...prevValue], value);
} else {
base[key] = value;
}
});
return base;
}
function deepMerge(base, other) {
const next = Array.isArray(base) ? merge([], base) : merge({}, base);
if (other) {
merge(next, other);
}
return next;
}
function formatMs(ms, options) {

@@ -715,2 +742,3 @@ if (!Number.isFinite(ms) || ms === 0) {

exports.deepFreeze = deepFreeze;
exports.deepMerge = deepMerge;
exports.formatMs = formatMs;

@@ -717,0 +745,0 @@ exports.instanceOf = instanceOf;

4

package.json
{
"name": "@boost/common",
"version": "2.2.2",
"version": "2.3.0",
"release": "1594765247526",

@@ -38,3 +38,3 @@ "description": "A collection of common utilities, classes, and helpers.",

},
"gitHead": "ae1d2626dae91a712357029bc6d43a78b422ed27"
"gitHead": "d62e9f07d8ba7d6b195a9bfdc0945eb12d0222ed"
}

Sorry, the diff of this file is not supported yet

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