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

@contrail/util

Package Overview
Dependencies
Maintainers
4
Versions
69
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@contrail/util - npm Package Compare versions

Comparing version 1.0.9 to 1.0.10

lib/object-util.merge.spec.d.ts

2

lib/object-util.d.ts
export declare class ObjectUtil {
static getByPath(obj: any, path: string, def?: any): any;
static setByPath(obj: any, path: string, value: any): void;
static isObject(item: any): boolean;
static mergeDeep(target: any, ...sources: any[]): any;
}

@@ -31,3 +31,24 @@ "use strict";

}
static isObject(item) {
return (item && typeof item === 'object' && !Array.isArray(item));
}
static mergeDeep(target, ...sources) {
if (!sources.length)
return target;
const source = sources.shift();
if (this.isObject(target) && this.isObject(source)) {
for (const key in source) {
if (this.isObject(source[key])) {
if (!target[key])
Object.assign(target, { [key]: {} });
this.mergeDeep(target[key], source[key]);
}
else {
Object.assign(target, { [key]: source[key] });
}
}
}
return this.mergeDeep(target, ...sources);
}
}
exports.ObjectUtil = ObjectUtil;

2

package.json
{
"name": "@contrail/util",
"version": "1.0.9",
"version": "1.0.10",
"description": "General javascript utilities",

@@ -5,0 +5,0 @@ "main": "lib/index.js",

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