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

@travetto/base

Package Overview
Dependencies
Maintainers
1
Versions
357
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@travetto/base - npm Package Compare versions

Comparing version 0.0.57 to 0.0.58

2

package.json

@@ -21,3 +21,3 @@ {

"scripts": {},
"version": "0.0.57"
"version": "0.0.58"
}

@@ -18,2 +18,10 @@ export function isPrimitive(el: any): el is (string | boolean | number | RegExp) {

export function isClass(o: any) {
return o && o.prototype && o.prototype.constructor !== Object.getPrototypeOf(Function);
}
export function isSimple(a: any) {
return isPrimitive(a) || isFunction(a) || isClass(a);
}
function _deepMerge(a: any, b: any, level = 0) {

@@ -29,4 +37,4 @@ const isEmptyA = a === undefined || a === null;

if (isPrimitive(b) || isFunction(b)) {
if (isEmptyA || isPrimitive(a) || isFunction(a)) {
if (isSimple(b)) { // Scalars
if (isEmptyA || isSimple(a)) {
a = b;

@@ -36,3 +44,3 @@ } else {

}
} else if (isArrB) {
} else if (isArrB) { // Arrays
const bArr = b;

@@ -50,3 +58,3 @@ if (a === undefined) {

}
} else {
} else { // Object
if (isEmptyA || isArrA || isPrimitive(a)) {

@@ -53,0 +61,0 @@ if (level === 0) {

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