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

Add docs for Parser#isBrowser

This commit is contained in:
Denis Demchenko 2019-04-12 21:06:09 +03:00
parent 69972820c8
commit 4b658441ca

View File

@ -402,6 +402,12 @@ class Parser {
return undefined;
}
/**
* Check if the browser name equals the passed string
* @param browserName The string to compare with the browser name
* @param [includingAlias=false] The flag showing whether alias will be included into comparison
* @returns {boolean}
*/
isBrowser(browserName, includingAlias = false) {
const defaultBrowserName = this.getBrowserName();
const possibleNames = [defaultBrowserName.toLowerCase()];