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

Complete Bowser's methods by call a Parser instance

This commit is contained in:
Denis Demchenko 2017-06-08 21:26:05 +03:00
parent 5a235015aa
commit 19646053ce

View File

@ -31,50 +31,59 @@ class Bowser {
this._parser = new Parser(UA); this._parser = new Parser(UA);
} }
// static filter(UACollection, range) {}
// static inRange(range, UACollection) {}
/** /**
* Get browser's version * Get browser's version
* @returns {String} * @returns {String}
*/ */
getBrowserVersion() {} getBrowserVersion() {
return this._parser.getBrowserVersion();
}
/** /**
* Get a browser's name * Get a browser's name
* @returns {String} * @returns {String}
*/ */
getBrowserName() {} getBrowserName() {
return this._parser.getBrowserName();
}
/** /**
* Get an object with a name and version of the browser * Get an object with a name and version of the browser
* @returns {Object} * @returns {Object}
*/ */
getBrowser() {} getBrowser() {
return this._parser.getBrowser();
}
/** /**
* Get an object with a name and version of the OS if it's defined * Get an object with a name and version of the OS if it's defined
* @returns {Object} * @returns {Object}
*/ */
getOS() {} getOS() {
return this._parser.getOS();
}
/** /**
* Get name of OS * Get name of OS
* @returns {String} * @returns {String}
*/ */
getOSName() {} getOSName() {
return this._parser.getOSName();
}
/** /**
* Get OS version * Get OS version
*/ */
getOSVersion() {} getOSVersion() {
return this._parser.getOSVersion();
}
/** /**
* Check if the browser is in range or not * Check if the browser is in range or not
* @param {Object} range * @param {Object} range
* @returns {Boolean} * @returns {Boolean}
*/ */
inRange(range) { static inRange(range) {
if (!range) { if (!range) {
throw new Error('Range can not be empty'); throw new Error('Range can not be empty');
} }
@ -85,5 +94,9 @@ class Bowser {
* @param {Object} range * @param {Object} range
* @returns {Boolean} * @returns {Boolean}
*/ */
notInRange(range) {} static notInRange(range) {}
// static filter(UACollection, range) {}
// static inRange(range, UACollection) {}
} }