This commit is contained in:
Joel
2025-07-08 17:25:40 +08:00
160 changed files with 7071 additions and 550 deletions

View File

@ -120,3 +120,13 @@ export function getMarketplaceUrl(path: string, params?: Record<string, string |
}
return `${MARKETPLACE_URL_PREFIX}${path}?${searchParams.toString()}`
}
export const replaceSpaceWithUnderscreInVarNameInput = (input: HTMLInputElement) => {
const start = input.selectionStart
const end = input.selectionEnd
input.value = input.value.replaceAll(' ', '_')
if (start !== null && end !== null)
input.setSelectionRange(start, end)
}