mirror of
https://github.com/mue/mue.git
synced 2026-06-13 03:58:49 +02:00
refactor: Reduce bundle size, replace date picker and merge function, add widget order feature etc
Co-authored-by: Alex Sparkes <turbomarshmello@gmail.com>
This commit is contained in:
@@ -126,5 +126,9 @@
|
||||
{
|
||||
"name": "fontweight",
|
||||
"value": 400
|
||||
},
|
||||
{
|
||||
"name": "order",
|
||||
"value": "[\"greeting\", \"time\", \"quote\", \"date\"]"
|
||||
}
|
||||
]
|
||||
|
||||
@@ -1,19 +0,0 @@
|
||||
export default function deepmerge(...objects) {
|
||||
let target = {};
|
||||
|
||||
const merge = (obj) => {
|
||||
for (let prop in obj) {
|
||||
if (obj.hasOwnProperty(prop)) {
|
||||
if (typeof obj[prop] === 'object') {
|
||||
target[prop] = deepmerge(target[prop], obj[prop]);
|
||||
} else {
|
||||
target[prop] = obj[prop];
|
||||
}
|
||||
}
|
||||
}
|
||||
};
|
||||
|
||||
objects.forEach(object => merge(object));
|
||||
|
||||
return target;
|
||||
}
|
||||
Reference in New Issue
Block a user