mirror of
https://github.com/zkldi/Tachi.git
synced 2026-10-09 07:09:57 +03:00
Add tests for TransposeFolderData and make it so it replaces multiple items in onekey
This commit is contained in:
@@ -93,7 +93,7 @@ export function TransposeFolderData(obj: Record<string, unknown>) {
|
||||
const transposedObj: Record<string, unknown> = {};
|
||||
|
||||
for (const key in obj) {
|
||||
const transposedKey = key.replace(/~/u, "$").replace(/¬/u, ".");
|
||||
const transposedKey = key.replace(/~/gu, "$").replace(/¬/gu, ".");
|
||||
|
||||
if (typeof obj[key] === "object" && obj[key]) {
|
||||
transposedObj[transposedKey] = TransposeFolderData(obj[key] as Record<string, unknown>);
|
||||
|
||||
Reference in New Issue
Block a user