mirror of
https://github.com/lancedikson/bowser
synced 2026-03-02 03:40:27 +00:00
Improve documentation language, fix an example
This commit is contained in:
@@ -23,8 +23,8 @@ class Bowser {
|
||||
* @throws {Error} when UA is not a String
|
||||
*
|
||||
* @example
|
||||
* const bowser = new Bowser(window.navigator.userAgent);
|
||||
* bowser.getResult()
|
||||
* const parser = Bowser.getParser(window.navigator.userAgent);
|
||||
* const result = parser.getResult();
|
||||
*/
|
||||
static getParser(UA, skipParsing = false) {
|
||||
if (typeof UA !== 'string') {
|
||||
@@ -38,6 +38,9 @@ class Bowser {
|
||||
*
|
||||
* @param UA
|
||||
* @return {ParsedResult}
|
||||
*
|
||||
* @example
|
||||
* const result = Bowser.parse(window.navigator.userAgent);
|
||||
*/
|
||||
static parse(UA) {
|
||||
return (new Parser(UA)).getResult();
|
||||
|
||||
Reference in New Issue
Block a user