bowser-castle
Advanced tools
Comparing version 0.2.1 to 0.2.2
@@ -1,2 +0,2 @@ | ||
import Bowser from "bowser"; | ||
import * as Bowser from "bowser"; | ||
export interface IBowserCastle extends Bowser.Parser.Details { | ||
@@ -3,0 +3,0 @@ mobile: boolean; |
@@ -1,2 +0,2 @@ | ||
import Bowser from "bowser"; | ||
import * as Bowser from "bowser"; | ||
const detect = (userAgent) => { | ||
@@ -3,0 +3,0 @@ const browserInfo = Bowser.getParser(userAgent !== null && userAgent !== void 0 ? userAgent : ''); |
{ | ||
"name": "bowser-castle", | ||
"version": "0.2.1", | ||
"version": "0.2.2", | ||
"description": "", | ||
@@ -5,0 +5,0 @@ "main": "dist/bowserCastle.js", |
@@ -1,2 +0,3 @@ | ||
import Bowser from "bowser"; | ||
import * as Bowser from "bowser"; | ||
export interface IBowserCastle extends Bowser.Parser.Details { | ||
@@ -7,3 +8,3 @@ mobile: boolean; | ||
const detect = (userAgent: string): IBowserCastle => { | ||
const detect = (userAgent: string): Bowser.Parser.Details & { mobile: boolean; tablet: boolean; } => { | ||
const browserInfo = Bowser.getParser(userAgent ?? ''); | ||
@@ -15,6 +16,6 @@ const bowserCastle = { | ||
}; | ||
return bowserCastle; | ||
return bowserCastle as Bowser.Parser.Details & { mobile: boolean; tablet: boolean; }; | ||
} | ||
(function(root: any, name: string, definition: () => IBowserCastle) { | ||
(function(root: any, name: string, definition: () => Bowser.Parser.Details & { mobile: boolean; tablet: boolean; }) { | ||
if (typeof module !== 'undefined' && module.exports) { | ||
@@ -28,3 +29,3 @@ module.exports = definition(); | ||
})(this, 'bowserCastle', () => { | ||
return detect(typeof navigator !== 'undefined' ? navigator.userAgent : ''); | ||
return detect(typeof navigator !== 'undefined' ? navigator.userAgent : '') as Bowser.Parser.Details & { mobile: boolean; tablet: boolean; }; | ||
}); |
Sorry, the diff of this file is not supported yet
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
5696