@deot/helper-route 1.1.4 → 1.1.5
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/index.cjs +3 -2
- package/dist/index.iife.js +3 -2
- package/dist/index.js +3 -2
- package/dist/index.umd.cjs +3 -2
- package/package.json +1 -1
package/dist/index.cjs
CHANGED
|
@@ -59,10 +59,11 @@ const parse = (url, options) => {
|
|
|
59
59
|
query[key] = typeof options$.parse === "function" ? options$.parse(value$) : value$;
|
|
60
60
|
});
|
|
61
61
|
}
|
|
62
|
-
const
|
|
62
|
+
const pIndex = prefix.indexOf("://");
|
|
63
|
+
const sIndex = prefix.indexOf("/", pIndex === -1 ? 0 : pIndex + 3);
|
|
63
64
|
return {
|
|
64
65
|
origin: (sIndex !== -1 ? prefix.slice(0, sIndex) : prefix) || "",
|
|
65
|
-
path: prefix.slice(sIndex),
|
|
66
|
+
path: sIndex !== -1 ? prefix.slice(sIndex) : "",
|
|
66
67
|
query
|
|
67
68
|
};
|
|
68
69
|
};
|
package/dist/index.iife.js
CHANGED
|
@@ -88,10 +88,11 @@ var HelperRoute = (function (exports) {
|
|
|
88
88
|
query[key] = typeof options$.parse === "function" ? options$.parse(value$) : value$;
|
|
89
89
|
});
|
|
90
90
|
}
|
|
91
|
-
const
|
|
91
|
+
const pIndex = prefix.indexOf("://");
|
|
92
|
+
const sIndex = prefix.indexOf("/", pIndex === -1 ? 0 : pIndex + 3);
|
|
92
93
|
return {
|
|
93
94
|
origin: (sIndex !== -1 ? prefix.slice(0, sIndex) : prefix) || "",
|
|
94
|
-
path: prefix.slice(sIndex),
|
|
95
|
+
path: sIndex !== -1 ? prefix.slice(sIndex) : "",
|
|
95
96
|
query
|
|
96
97
|
};
|
|
97
98
|
};
|
package/dist/index.js
CHANGED
|
@@ -55,10 +55,11 @@ const parse = (url, options) => {
|
|
|
55
55
|
query[key] = typeof options$.parse === "function" ? options$.parse(value$) : value$;
|
|
56
56
|
});
|
|
57
57
|
}
|
|
58
|
-
const
|
|
58
|
+
const pIndex = prefix.indexOf("://");
|
|
59
|
+
const sIndex = prefix.indexOf("/", pIndex === -1 ? 0 : pIndex + 3);
|
|
59
60
|
return {
|
|
60
61
|
origin: (sIndex !== -1 ? prefix.slice(0, sIndex) : prefix) || "",
|
|
61
|
-
path: prefix.slice(sIndex),
|
|
62
|
+
path: sIndex !== -1 ? prefix.slice(sIndex) : "",
|
|
62
63
|
query
|
|
63
64
|
};
|
|
64
65
|
};
|
package/dist/index.umd.cjs
CHANGED
|
@@ -91,10 +91,11 @@
|
|
|
91
91
|
query[key] = typeof options$.parse === "function" ? options$.parse(value$) : value$;
|
|
92
92
|
});
|
|
93
93
|
}
|
|
94
|
-
const
|
|
94
|
+
const pIndex = prefix.indexOf("://");
|
|
95
|
+
const sIndex = prefix.indexOf("/", pIndex === -1 ? 0 : pIndex + 3);
|
|
95
96
|
return {
|
|
96
97
|
origin: (sIndex !== -1 ? prefix.slice(0, sIndex) : prefix) || "",
|
|
97
|
-
path: prefix.slice(sIndex),
|
|
98
|
+
path: sIndex !== -1 ? prefix.slice(sIndex) : "",
|
|
98
99
|
query
|
|
99
100
|
};
|
|
100
101
|
};
|