return u.toString();
}
-export const escapeHashIfRequired = (name: string, defaultTransformation?: Function) =>
- name.indexOf('#') > -1 ?
- encodeURIComponent(name) :
- defaultTransformation ?
- defaultTransformation(name) :
- name;
\ No newline at end of file
+export const customEncodeURI = (path: string) => {
+ try {
+ return path.split('/').map(encodeURIComponent).join('/');
+ } catch(e) {}
+
+ return path;
+};
+
+export const customDecodeURI = (path: string) => {
+ try {
+ return path.split('%2F').map(decodeURIComponent).join('%2F');
+ } catch(e) {}
+
+ return path;
+};