mirror of
https://github.com/lancedikson/bowser
synced 2024-10-27 20:34:22 +00:00
add check method
This commit is contained in:
parent
57a45d1dee
commit
c9eed902e3
@ -461,8 +461,9 @@
|
||||
|
||||
/**
|
||||
* Check if browser is unsupported
|
||||
*
|
||||
* @example
|
||||
* bowser.check({
|
||||
* bowser.isUnsupportedBrowser({
|
||||
* msie: "10",
|
||||
* firefox: "23",
|
||||
* chrome: "29",
|
||||
@ -491,6 +492,17 @@
|
||||
return true && !strictMode; // not found
|
||||
}
|
||||
|
||||
/**
|
||||
* Check if browser is supported
|
||||
*
|
||||
* @param {Object} minVersions map of minimal version to browser
|
||||
* @param {Boolean} strictMode flag to return false if browser wasn't found in map
|
||||
* @return {Boolean}
|
||||
*/
|
||||
function check(minVersions, strictMode) {
|
||||
return !isUnsupportedBrowser(minVersions, strictMode);
|
||||
}
|
||||
|
||||
bowser.isUnsupportedBrowser = isUnsupportedBrowser;
|
||||
bowser.compareVersions = compareVersions;
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user