refactor: favorites tab

This commit is contained in:
pa
2025-11-09 21:59:24 +09:00
committed by Natsumi
parent 9069d8cefe
commit bbd5fa2b21
17 changed files with 4987 additions and 1841 deletions

View File

@@ -56,4 +56,16 @@ function moveArrayItem(array, fromIndex, toIndex) {
array.splice(toIndex, 0, item);
}
export { removeFromArray, arraysMatch, moveArrayItem };
function replaceReactiveObject(target, source) {
for (const key in target) {
if (Object.prototype.hasOwnProperty.call(target, key)) {
delete target[key];
}
}
for (const key in source) {
target[key] = source[key];
}
}
export { removeFromArray, arraysMatch, moveArrayItem, replaceReactiveObject };