1
0
mirror of https://github.com/lancedikson/bowser synced 2024-10-27 20:34:22 +00:00

Add a public .detect() method

This commit is contained in:
Joan Claret 2017-11-13 09:57:56 +01:00 committed by Denis Demchenko
parent 4eaa50b7b0
commit 5b4a89b42a
2 changed files with 6 additions and 0 deletions

View File

@ -611,5 +611,10 @@
*/
bowser._detect = detect;
/*
* Set our detect public method to the main bowser object
* This is needed to implement bowser in server side
*/
bowser.detect = detect;
return bowser
});

1
typings.d.ts vendored
View File

@ -96,6 +96,7 @@ declare namespace bowser {
(): IBowserDetection;
test(browserList: string[]): boolean;
_detect(ua: string): IBowser;
detect(ua: string): IBowser;
compareVersions(versions: string[]): number;
check(minVersions: IBowserMinVersions, strictMode?: boolean|string, ua?: string): Boolean;
isUnsupportedBrowser(minVersions: IBowserMinVersions, strictMode?: boolean|string, ua?: string): boolean;