@mptw/skylens-ui 1.4.63 → 1.4.64
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/package.json +1 -1
- package/utils/index.ts +7 -0
package/package.json
CHANGED
package/utils/index.ts
CHANGED
|
@@ -533,6 +533,13 @@ export const httpUrlToHost = (url: string) => {
|
|
|
533
533
|
|
|
534
534
|
return url;
|
|
535
535
|
}
|
|
536
|
+
export const hostToHttpUrl = (host: string) => {
|
|
537
|
+
if (/^https?:\/\//.test(host)) {
|
|
538
|
+
return host;
|
|
539
|
+
}
|
|
540
|
+
|
|
541
|
+
return `https://${host}`;
|
|
542
|
+
}
|
|
536
543
|
|
|
537
544
|
export const isValidDate = (d: any) => {
|
|
538
545
|
if (Object.prototype.toString.call(d) === "[object Date]") {
|