@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.
Files changed (2) hide show
  1. package/package.json +1 -1
  2. package/utils/index.ts +7 -0
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "@mptw/skylens-ui",
3
3
  "type": "module",
4
- "version": "1.4.63",
4
+ "version": "1.4.64",
5
5
  "main": "./nuxt.config.ts",
6
6
  "scripts": {
7
7
  "dev": "nuxi dev .playground",
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]") {