mirror of
https://github.com/discourse/discourse.git
synced 2025-05-24 03:36:18 +08:00
Rename merge
to deepMerge
so it's more clear what it's doing
This commit is contained in:
@ -1,9 +1,9 @@
|
||||
// a fairly simple deep merge based on: https://gist.github.com/ahtcx/0cd94e62691f539160b32ecda18af3d6
|
||||
function isObject(obj) {
|
||||
return obj && typeof obj === "object";
|
||||
}
|
||||
|
||||
export function merge(...objects) {
|
||||
// a fairly simple deep merge based on: https://gist.github.com/ahtcx/0cd94e62691f539160b32ecda18af3d6
|
||||
export function deepMerge(...objects) {
|
||||
function deepMergeInner(target, source) {
|
||||
Object.keys(source).forEach(key => {
|
||||
const targetValue = target[key];
|
||||
|
Reference in New Issue
Block a user