This is a deno module for merging two objects/array deeply. This is NOT the same as deepmerge npm package
import { deepmerge } from "https://deno.land/x/deepmerge@VERSION/mod.ts"
const a = {
foo: {
bar: "somestring"
}
}
const b = {
foo: {
baz: "something else"
}
}
const output = deepmerge(a, b) // You can even merge three or 10, maybe 100 objects !
console.log(output)
/*
{
foo: {
bar: "somestring"
baz: "something else"
}
}
*/
/!\ You cannot merge Arrays, only Objects are currently supported /!\
// Merges objects from sources into another (target) object
function deepmerge(target: any, ...sources: any[]): any
Full doc can be found at https://doc.deno.land/x/deepmerge@VERSION/mod.ts