Page MenuHomeSealhub

escape-url-params.ts
No OneTemporary

escape-url-params.ts

export function escape_url_params(url: string): string {
return url
.split("/")
.map((e) => (e.startsWith(":") ? `[${e.slice(1)}]` : e))
.filter((e) => e != "")
.join("/");
}
export function unescape_url_params(url: string): string {
return url
.split("/")
.map((e) => (e.startsWith("[") ? `:${e.slice(1, e.length - 1)}` : e))
.join("/");
}

File Metadata

Mime Type
text/plain
Expires
Fri, Jan 24, 15:16 (1 d, 9 h)
Storage Engine
blob
Storage Format
Raw Data
Storage Handle
600927
Default Alt Text
escape-url-params.ts (358 B)

Event Timeline