(s)
| 40219 | } |
| 40220 | return i.toString() |
| 40221 | }, |
| 40222 | sanitize = (s) => { |
| 40223 | if (ul(s)) |
| 40224 | return ((s) => { |
| 40225 | const o = [/\?/g, '%3F', /#/g, '%23'] |
| 40226 | let i = s |
| 40227 | ;(isWindows() && (i = i.replace(/\\/g, '/')), (i = encodeURI(i))) |
| 40228 | for (let s = 0; s < o.length; s += 2) i = i.replace(o[s], o[s + 1]) |
| 40229 | return i |
| 40230 | })(toFileSystemPath(s)) |
| 40231 | try { |
| 40232 | return new URL(s).toString() |
| 40233 | } catch { |
| 40234 | return encodeURI(decodeURI(s)).replace(/%5B/g, '[').replace(/%5D/g, ']') |
| 40235 | } |
| 40236 | }, |
| 40237 | unsanitize = (s) => (ul(s) ? toFileSystemPath(s) : decodeURI(s)), |
| 40238 | { |
no test coverage detected