You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
10 lines
296 B
10 lines
296 B
import { createDefu } from "defu";
|
|
|
|
export { createDefu as createMerge, defu as merge } from "defu";
|
|
|
|
export const mergeWithArrayOverride = createDefu((originObj, key, updates) => {
|
|
if (Array.isArray(originObj[key]) && Array.isArray(updates)) {
|
|
originObj[key] = updates;
|
|
return true;
|
|
}
|
|
});
|
|
|