X-Git-Url: https://git.josue.xyz/?p=VSoRC%2F.git;a=blobdiff_plain;f=node_modules%2Fxterm%2Fsrc%2Fcommon%2FPlatform.ts;fp=node_modules%2Fxterm%2Fsrc%2Fcommon%2FPlatform.ts;h=0000000000000000000000000000000000000000;hp=aae06c746f78f744926d41730bcdd5faa39d3634;hb=5e96dd57ddd883604e87f62bdddcb111c63a6e1a;hpb=acb5f682a2b75b972710cabd81658f63071324b0 diff --git a/node_modules/xterm/src/common/Platform.ts b/node_modules/xterm/src/common/Platform.ts deleted file mode 100644 index aae06c7..0000000 --- a/node_modules/xterm/src/common/Platform.ts +++ /dev/null @@ -1,39 +0,0 @@ -/** - * Copyright (c) 2016 The xterm.js authors. All rights reserved. - * @license MIT - */ - -interface INavigator { - userAgent: string; - language: string; - platform: string; -} - -// We're declaring a navigator global here as we expect it in all runtimes (node and browser), but -// we want this module to live in common. -declare const navigator: INavigator; - -const isNode = (typeof navigator === 'undefined') ? true : false; -const userAgent = (isNode) ? 'node' : navigator.userAgent; -const platform = (isNode) ? 'node' : navigator.platform; - -export const isFirefox = !!~userAgent.indexOf('Firefox'); -export const isSafari = /^((?!chrome|android).)*safari/i.test(userAgent); - -// Find the users platform. We use this to interpret the meta key -// and ISO third level shifts. -// http://stackoverflow.com/q/19877924/577598 -export const isMac = contains(['Macintosh', 'MacIntel', 'MacPPC', 'Mac68K'], platform); -export const isIpad = platform === 'iPad'; -export const isIphone = platform === 'iPhone'; -export const isWindows = contains(['Windows', 'Win16', 'Win32', 'WinCE'], platform); -export const isLinux = platform.indexOf('Linux') >= 0; - -/** - * Return if the given array contains the given element - * @param arr The array to search for the given element. - * @param el The element to look for into the array - */ -function contains(arr: any[], el: any): boolean { - return arr.indexOf(el) >= 0; -}