A javascript library used to merge multiple objects.
NPM package
npm install objects-merge
If you want to merge multiple objects
import { merge } from 'objects-merge';
const DefaultTheme = {
Colors: {
Black : "#000",
White: "#FFF",
},
textSize: {
size: {
body: "14px",
paragraph: "14px",
},
height: {
body: "24px",
paragraph: "26px",
}
}
};
const NewTheme = {
Colors: {
Gray: "#FAFBFB",
Success: "#FAFDFC",
Warning: "#FFFDF8",
Disabled: "#B0B7C3",
},
textSize: {
size: {
title: "22px",
heading: "26px",
},
height: {
title: "32px",
heading: "40px",
}
}
}
let newMergedObject = merge(DefaultTheme, NewTheme);
Distributed under the MIT License
[license-url]: