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

@ctx-core/object

Package Overview
Dependencies
Maintainers
1
Versions
666
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@ctx-core/object - npm Package Compare versions

Comparing version 4.1.1 to 4.2.0

26

lib.js

@@ -117,2 +117,26 @@ import { _andand } from '@ctx-core/function'

/**
* Performs a deep merge on the target with each a1__source
* @param target
* @param {...object} a1__source
* @returns target
*/
export function merge(target, ...a1__source) {
// Loop through each object and conduct a merge
for (let i = 0; i < a1__source.length; i++) {
const source = a1__source[i]
for (let prop in source) {
if (source.hasOwnProperty(prop)) {
if (Object.prototype.toString.call(source[prop]) === '[object Object]') {
// If we're doing a deep merge and the property is an object
target[prop] = merge(target[prop], source[prop])
} else {
// Otherwise, do a regular merge
target[prop] = source[prop]
}
}
}
}
return target
}
/**
* Ensures that the keys in `a1__rest` are added to ctx

@@ -183,3 +207,3 @@ * only if the key is not defined on [ctx](#ctx) (== null).

export function unpick__keys(ctx, obj__keys) {
return unpick(ctx, ...Object.keys(obj__keys))
return unpick(ctx, ...Object.keys(obj__keys))
}

@@ -186,0 +210,0 @@ export function _a1__value__pick(ctx, ...a1__key) {

4

package.json
{
"name": "@ctx-core/object",
"version": "4.1.1",
"version": "4.2.0",
"description": "ctx-core object",

@@ -26,3 +26,3 @@ "main": "lib.js",

},
"gitHead": "a5ae765cd901bed2ae71125bf82671731709c5fd"
"gitHead": "5229bb0b2a18a268f80352a7f49ea2b6b4047bbe"
}
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