Encode a url-like string by replacing any characters which need encoding
To reverse this encoding, the native decodeURIComponent can be used on the whole encoded string, without adjustment.
Parameters
path: string
A fully-qualified URL or url component (like a relative path)
Encode a url-like string by replacing any characters which need encoding To reverse this encoding, the native decodeURIComponent can be used on the whole encoded string, without adjustment.