it-tools/src/tools/safelink-decoder/safelink-decoder.service.ts
sharevb ec6785e362
Use native URL parsing
Co-authored-by: Corentin THOMASSET <corentin.thomasset74@gmail.com>
2024-03-03 11:44:12 +01:00

4 lines
116 B
TypeScript

export function decodeSafeLinksURL(safeLinksUrl: string) {
return new URL(safeLinksUrl).searchParams.get('url')
}