diff --git a/notNeededPackages.json b/notNeededPackages.json index b409f91181..8d0638a871 100644 --- a/notNeededPackages.json +++ b/notNeededPackages.json @@ -1950,6 +1950,12 @@ "sourceRepoURL": "https://github.com/sindresorhus/is-url-superb", "asOfVersion": "3.0.0" }, + { + "libraryName": "ismobilejs", + "typingsPackageName": "ismobilejs", + "sourceRepoURL": "https://github.com/kaimallea/isMobile", + "asOfVersion": "1.0.0" + }, { "libraryName": "issue-regex", "typingsPackageName": "issue-regex", diff --git a/types/ismobilejs/index.d.ts b/types/ismobilejs/index.d.ts deleted file mode 100644 index 18eee7ea1a..0000000000 --- a/types/ismobilejs/index.d.ts +++ /dev/null @@ -1,57 +0,0 @@ -// Type definitions for ismobilejs 0.4 -// Project: https://github.com/kaimallea/isMobile -// Definitions by: Maksim Karelov -// Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped - -interface Apple { - phone: boolean; - ipod: boolean; - tablet: boolean; - device: boolean; -} - -interface Android { - phone: boolean; - tablet: boolean; - device: boolean; -} - -interface Amazon { - phone: boolean; - tablet: boolean; - device: boolean; -} - -interface Windows { - phone: boolean; - tablet: boolean; - device: boolean; -} - -interface Other { - blackberry_10: boolean; - blackberry: boolean; - opera: boolean; - firefox: boolean; - chrome: boolean; - device: boolean; -} - -interface IsMobile { - any: boolean; - phone: boolean; - tablet: boolean; - seven_inch: boolean; - - apple: Apple; - android: Android; - amazon: Amazon; - windows: Windows; - other: Other; - - (userAgent?: string): IsMobile; -} - -declare const isMobile: IsMobile; - -export = isMobile; diff --git a/types/ismobilejs/ismobilejs-tests.ts b/types/ismobilejs/ismobilejs-tests.ts deleted file mode 100644 index d53c674da9..0000000000 --- a/types/ismobilejs/ismobilejs-tests.ts +++ /dev/null @@ -1,19 +0,0 @@ -import * as isMobile from 'ismobilejs'; - -const MOZILLA_ANDROID_UA = 'Mozilla/5.0 (Android 4.4; Mobile; rv:41.0) Gecko/41.0 Firefox/41.0'; -const MOZILLA_IPHONE_UA = 'Mozilla/5.0 (iPhone; CPU iPhone OS 8_3 like Mac OS X) AppleWebKit/600.1.4 (KHTML, like Gecko) FxiOS/1.0 Mobile/12F69 Safari/600.1.4'; - -const CHROME_ANDROID_UA = 'Mozilla/5.0 (Linux; Android 8.0.0; Pixel Build/OPP3.170518.006) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/60.0.3112.66 Mobile Safari/537.36'; -const CHROME_IPHONE_UA = 'Mozilla/5.0 (iPhone; CPU iPhone OS 10_3 like Mac OS X) AppleWebKit/602.1.50 (KHTML, like Gecko) CriOS/56.0.2924.75 Mobile/14E5239e Safari/602.1'; - -// $ExpectType boolean -isMobile(MOZILLA_ANDROID_UA).android.phone; -// $ExpectType boolean -isMobile(MOZILLA_IPHONE_UA).apple.phone; - -// $ExpectType boolean -isMobile(CHROME_ANDROID_UA).android.phone; -// $ExpectType boolean -isMobile(CHROME_IPHONE_UA).apple.phone; - -console.log(isMobile.apple); diff --git a/types/ismobilejs/tsconfig.json b/types/ismobilejs/tsconfig.json deleted file mode 100644 index e35d648c53..0000000000 --- a/types/ismobilejs/tsconfig.json +++ /dev/null @@ -1,24 +0,0 @@ -{ - "compilerOptions": { - "module": "commonjs", - "lib": [ - "es6", - "dom" - ], - "noImplicitAny": true, - "noImplicitThis": true, - "strictNullChecks": true, - "strictFunctionTypes": true, - "baseUrl": "../", - "typeRoots": [ - "../" - ], - "types": [], - "noEmit": true, - "forceConsistentCasingInFileNames": true - }, - "files": [ - "index.d.ts", - "ismobilejs-tests.ts" - ] -} \ No newline at end of file diff --git a/types/ismobilejs/tslint.json b/types/ismobilejs/tslint.json deleted file mode 100644 index 3db14f85ea..0000000000 --- a/types/ismobilejs/tslint.json +++ /dev/null @@ -1 +0,0 @@ -{ "extends": "dtslint/dt.json" }