mirror of
https://github.com/lancedikson/bowser
synced 2026-03-02 03:40:27 +00:00
Merge pull request #437 from willamesoares/include-alias-check
feat: add support for using alias in 'is' method
This commit is contained in:
@@ -474,10 +474,12 @@ class Parser {
|
||||
* Is anything? Check if the browser is called "anything",
|
||||
* the OS called "anything" or the platform called "anything"
|
||||
* @param {String} anything
|
||||
* @param [includingAlias=false] The flag showing whether alias will be included into comparison
|
||||
* @returns {Boolean}
|
||||
*/
|
||||
is(anything) {
|
||||
return this.isBrowser(anything) || this.isOS(anything) || this.isPlatform(anything);
|
||||
is(anything, includingAlias = false) {
|
||||
return this.isBrowser(anything, includingAlias) || this.isOS(anything)
|
||||
|| this.isPlatform(anything);
|
||||
}
|
||||
|
||||
/**
|
||||
|
||||
Reference in New Issue
Block a user