1
0
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:
Arve Knudsen
2018-10-19 19:32:59 +02:00
parent 6bde5e128f
commit 316399d6e9
10 changed files with 4275 additions and 4040 deletions

View File

@@ -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();