@ctx-core/object
Advanced tools
Comparing version 5.1.1 to 5.2.0
12
lib.js
@@ -119,2 +119,3 @@ import { _andand } from '@ctx-core/function' | ||
export function mixin(target, ...a1__source) { | ||
if (!target) return | ||
for (let i = 0; i < a1__source.length; i++) { | ||
@@ -140,2 +141,3 @@ const source = a1__source[i] | ||
export function merge(target, ...a1__source) { | ||
if (!target) return | ||
// Loop through each object and conduct a merge | ||
@@ -171,2 +173,3 @@ for (let i = 0; i < a1__source.length; i++) { | ||
export function ensure(obj, ...a1__ctx__rest) { | ||
if (!obj) return | ||
for (let i = 0; i < a1__ctx__rest.length; i++) { | ||
@@ -190,2 +193,3 @@ const rest = a1__ctx__rest[i] | ||
export function pick(obj, ...a1__key) { | ||
if (!obj) return | ||
let memo = {} | ||
@@ -206,2 +210,3 @@ for (let i = 0; i < a1__key.length; i++) { | ||
export function pick__hasOwnProperty(obj, ...a1__key) { | ||
if (!obj) return | ||
let memo = {} | ||
@@ -220,2 +225,3 @@ for (let i = 0; i < a1__key.length; i++) { | ||
export function unpick(obj, ...a1__key) { | ||
if (!obj) return | ||
let memo = {} | ||
@@ -252,2 +258,3 @@ const obj_key_a1 = keys(obj) | ||
export function _a1__value__pick(obj, ...a1__key) { | ||
if (!obj) return | ||
let a1__value = [] | ||
@@ -267,2 +274,3 @@ for (let i = 0; i < a1__key.length; i++) { | ||
export function exclude(obj, ...a1__key) { | ||
if (!obj) return | ||
const __ = {} | ||
@@ -294,2 +302,3 @@ const exclude = new Set(a1__key) | ||
export function some(obj, some__compare) { | ||
if (!obj) return | ||
for (let key in obj) { | ||
@@ -317,2 +326,3 @@ if (some__compare(obj[key], key)) return true | ||
export function ensure__refresh(obj, ...a1__ctx__refresh) { | ||
if (!obj) return | ||
const ctx__refresh = clone(...a1__ctx__refresh) | ||
@@ -341,3 +351,3 @@ const { | ||
*/ | ||
export function or__null(opts) { | ||
export function or__null(opts = {}) { | ||
const { | ||
@@ -344,0 +354,0 @@ value, |
{ | ||
"name": "@ctx-core/object", | ||
"version": "5.1.1", | ||
"version": "5.2.0", | ||
"description": "ctx-core object", | ||
@@ -30,3 +30,3 @@ "main": "lib.js", | ||
}, | ||
"gitHead": "bdcb964274f1a3039e1e2cb19e4e959488cff2e0" | ||
"gitHead": "cef56d835dd32280a78caf1ee5d3652a76d0fa11" | ||
} |
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
13209
493