@cuemath/web-utils 1.0.41 → 1.0.42
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.
|
@@ -5,7 +5,7 @@ exports.removeTrailingSlashFromPath = exports.removeHrefLangFromPath = exports.r
|
|
|
5
5
|
const removeQueryStringFromPath = (path) => path?.split('?')[0];
|
|
6
6
|
exports.removeQueryStringFromPath = removeQueryStringFromPath;
|
|
7
7
|
// remove hreflang from path /en-in/ to /
|
|
8
|
-
const removeHrefLangFromPath = (path) => path
|
|
8
|
+
const removeHrefLangFromPath = (path) => path?.replace(/\/en-[a-z]{2}\//, '/');
|
|
9
9
|
exports.removeHrefLangFromPath = removeHrefLangFromPath;
|
|
10
10
|
// remove trailing slash from path /algebra/ to /algebra
|
|
11
11
|
const removeTrailingSlashFromPath = (path) => path?.replace(/\/$/, '');
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../src/url-parser/index.ts"],"names":[],"mappings":";;;AAAA,6DAA6D;AACtD,MAAM,yBAAyB,GAAG,CAAC,IAAS,EAAE,EAAE,CAAC,IAAI,EAAE,KAAK,CAAC,GAAG,CAAC,CAAC,CAAC,CAAC,CAAC;AAA/D,QAAA,yBAAyB,6BAAsC;AAE5E,yCAAyC;AAClC,MAAM,sBAAsB,GAAG,CAAC,IAAY,EAAE,EAAE,CACrD,IAAI,
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../src/url-parser/index.ts"],"names":[],"mappings":";;;AAAA,6DAA6D;AACtD,MAAM,yBAAyB,GAAG,CAAC,IAAS,EAAE,EAAE,CAAC,IAAI,EAAE,KAAK,CAAC,GAAG,CAAC,CAAC,CAAC,CAAC,CAAC;AAA/D,QAAA,yBAAyB,6BAAsC;AAE5E,yCAAyC;AAClC,MAAM,sBAAsB,GAAG,CAAC,IAAY,EAAE,EAAE,CACrD,IAAI,EAAE,OAAO,CAAC,iBAAiB,EAAE,GAAG,CAAC,CAAC;AAD3B,QAAA,sBAAsB,0BACK;AAExC,wDAAwD;AACjD,MAAM,2BAA2B,GAAG,CAAC,IAAY,EAAE,EAAE,CAAC,IAAI,EAAE,OAAO,CAAC,KAAK,EAAE,EAAE,CAAC,CAAC;AAAzE,QAAA,2BAA2B,+BAA8C"}
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
// remove query params from path /algebra?query=1 to /algebra
|
|
2
2
|
export const removeQueryStringFromPath = (path) => path === null || path === void 0 ? void 0 : path.split('?')[0];
|
|
3
3
|
// remove hreflang from path /en-in/ to /
|
|
4
|
-
export const removeHrefLangFromPath = (path) => path.replace(/\/en-[a-z]{2}\//, '/');
|
|
4
|
+
export const removeHrefLangFromPath = (path) => path === null || path === void 0 ? void 0 : path.replace(/\/en-[a-z]{2}\//, '/');
|
|
5
5
|
// remove trailing slash from path /algebra/ to /algebra
|
|
6
6
|
export const removeTrailingSlashFromPath = (path) => path === null || path === void 0 ? void 0 : path.replace(/\/$/, '');
|
|
7
7
|
//# sourceMappingURL=index.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../src/url-parser/index.ts"],"names":[],"mappings":"AAAA,6DAA6D;AAC7D,MAAM,CAAC,MAAM,yBAAyB,GAAG,CAAC,IAAS,EAAE,EAAE,CAAC,IAAI,aAAJ,IAAI,uBAAJ,IAAI,CAAE,KAAK,CAAC,GAAG,EAAE,CAAC,CAAC,CAAC;AAE5E,yCAAyC;AACzC,MAAM,CAAC,MAAM,sBAAsB,GAAG,CAAC,IAAY,EAAE,EAAE,CACrD,IAAI,
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../src/url-parser/index.ts"],"names":[],"mappings":"AAAA,6DAA6D;AAC7D,MAAM,CAAC,MAAM,yBAAyB,GAAG,CAAC,IAAS,EAAE,EAAE,CAAC,IAAI,aAAJ,IAAI,uBAAJ,IAAI,CAAE,KAAK,CAAC,GAAG,EAAE,CAAC,CAAC,CAAC;AAE5E,yCAAyC;AACzC,MAAM,CAAC,MAAM,sBAAsB,GAAG,CAAC,IAAY,EAAE,EAAE,CACrD,IAAI,aAAJ,IAAI,uBAAJ,IAAI,CAAE,OAAO,CAAC,iBAAiB,EAAE,GAAG,CAAC,CAAC;AAExC,wDAAwD;AACxD,MAAM,CAAC,MAAM,2BAA2B,GAAG,CAAC,IAAY,EAAE,EAAE,CAAC,IAAI,aAAJ,IAAI,uBAAJ,IAAI,CAAE,OAAO,CAAC,KAAK,EAAE,EAAE,CAAC,CAAC"}
|