From c9eed902e3b4b4142660b87648f62ae61761e05e Mon Sep 17 00:00:00 2001 From: Alexander Lukin Date: Thu, 16 Jun 2016 13:04:57 +0300 Subject: [PATCH] add check method --- src/bowser.js | 14 +++++++++++++- 1 file changed, 13 insertions(+), 1 deletion(-) diff --git a/src/bowser.js b/src/bowser.js index e338617..59f1666 100644 --- a/src/bowser.js +++ b/src/bowser.js @@ -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;