Socket
Socket
Sign inDemoInstall

oberknecht-utils

Package Overview
Dependencies
Maintainers
1
Versions
119
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

oberknecht-utils - npm Package Compare versions

Comparing version 1.6.8 to 1.6.9

17

lib-js/utils/concatJSON.js
"use strict";
Object.defineProperty(exports, "__esModule", { value: true });
exports.concatJSON = void 0;
const _1 = require(".");
function concatJSON(arr) {
let arr_ = (0, _1.convertToArray)(arr);
let r = {};
arr.forEach((a) => {
Object.keys(a).forEach((b) => {
r[b] = a[b];
});
arr_.forEach((a) => {
function appendObj(obj, obj2) {
Object.keys(obj2).forEach((b) => {
if (obj[b] &&
(0, _1.extendedTypeof)(obj[b]) === "json" &&
(0, _1.extendedTypeof)(obj2[b]) === "json")
return appendObj(obj[b], obj2[b]);
obj[b] = obj2[b];
});
}
appendObj(r, a);
});

@@ -11,0 +20,0 @@ return r;

@@ -0,7 +1,20 @@

import { addKeysToObject, convertToArray, extendedTypeof } from ".";
export function concatJSON(arr: Record<string, any>[]) {
let arr_ = convertToArray(arr);
let r = {};
arr.forEach((a) => {
Object.keys(a).forEach((b) => {
r[b] = a[b];
});
arr_.forEach((a) => {
function appendObj(obj, obj2) {
Object.keys(obj2).forEach((b) => {
if (
obj[b] &&
extendedTypeof(obj[b]) === "json" &&
extendedTypeof(obj2[b]) === "json"
)
return appendObj(obj[b], obj2[b]);
obj[b] = obj2[b];
});
}
appendObj(r, a);
});

@@ -8,0 +21,0 @@

{
"name": "oberknecht-utils",
"version": "1.6.8",
"version": "1.6.9",
"description": "Utils for oberknecht packages",

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

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc