Skip to content
This repository has been archived by the owner on Oct 18, 2021. It is now read-only.
/ deno-deepmerge Public archive

This is a deno module for merging two objects/array deeply. This is NOT the same as deepmerge npm package

License

Notifications You must be signed in to change notification settings

loockeeer/deno-deepmerge

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

16 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Deno DeepMerge

This is a deno module for merging two objects/array deeply. This is NOT the same as deepmerge npm package

How to use

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 /!\

Documentation

// 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

About

This is a deno module for merging two objects/array deeply. This is NOT the same as deepmerge npm package

Resources

License

Stars

Watchers

Forks

Packages

No packages published