aboutsummaryrefslogtreecommitdiffstats
path: root/packages/dev-tools-pages/ts/utils/utils.ts
diff options
context:
space:
mode:
authorSteve Klebanoff <steve.klebanoff@gmail.com>2019-01-12 00:53:15 +0800
committerSteve Klebanoff <steve.klebanoff@gmail.com>2019-01-12 00:53:15 +0800
commitfaee7513952a4b87d5f9e9dde9deb20126f58834 (patch)
tree8168000e484e621e1526cf48fb0f979a6d98d972 /packages/dev-tools-pages/ts/utils/utils.ts
parent742e5e039dd4e821209b5511fb6a194d11c6291c (diff)
parent2cf57a48dd2857dd5cf2f31f4c60dd47ae4d34a5 (diff)
downloaddexon-sol-tools-faee7513952a4b87d5f9e9dde9deb20126f58834.tar.gz
dexon-sol-tools-faee7513952a4b87d5f9e9dde9deb20126f58834.tar.zst
dexon-sol-tools-faee7513952a4b87d5f9e9dde9deb20126f58834.zip
Merge branch 'development' into feature/instant/asset-buyer-check-liquidity
Diffstat (limited to 'packages/dev-tools-pages/ts/utils/utils.ts')
-rw-r--r--packages/dev-tools-pages/ts/utils/utils.ts32
1 files changed, 0 insertions, 32 deletions
diff --git a/packages/dev-tools-pages/ts/utils/utils.ts b/packages/dev-tools-pages/ts/utils/utils.ts
deleted file mode 100644
index b274706a2..000000000
--- a/packages/dev-tools-pages/ts/utils/utils.ts
+++ /dev/null
@@ -1,32 +0,0 @@
-import * as bowser from 'bowser';
-import * as _ from 'lodash';
-
-export const utils = {
- getColSize(items: number): number {
- const bassCssGridSize = 12; // Source: http://basscss.com/#basscss-grid
- const colSize = bassCssGridSize / items;
- if (!_.isInteger(colSize)) {
- throw new Error(`Number of cols must be divisible by ${bassCssGridSize}`);
- }
- return colSize;
- },
- getCurrentBaseUrl(): string {
- const port = window.location.port;
- const hasPort = !_.isUndefined(port);
- const baseUrl = `https://${window.location.hostname}${hasPort ? `:${port}` : ''}`;
- return baseUrl;
- },
- onPageLoadPromise: new Promise<void>((resolve, _reject) => {
- if (document.readyState === 'complete') {
- resolve();
- return;
- }
- window.onload = () => resolve();
- }),
- openUrl(url: string): void {
- window.open(url, '_blank');
- },
- isMobileOperatingSystem(): boolean {
- return bowser.mobile;
- },
-};