Skip to content

Commit

Permalink
Merge pull request #606 from rileyjshaw/patch-1
Browse files Browse the repository at this point in the history
Fix documentation
  • Loading branch information
faisalman authored Dec 6, 2022
2 parents c239ac5 + 7f71024 commit b814bcd
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions readme.md
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,7 @@ Like so:
```js
let parser = new UAParser("user-agent"); // you need to pass the user-agent for nodejs
console.log(parser); // {}
let parserResults = parser.getResults();
let parserResults = parser.getResult();
console.log(parserResults);
/** {
"ua": "",
Expand All @@ -48,7 +48,7 @@ console.log(parserResults);
} */
```

When you call UAParser without the `new` keyword, it will automatically call `getResults()` function and return the parsed results.
When you call UAParser without the `new` keyword, it will automatically call `getResult()` function and return the parsed results.
* `UAParser([uastring][,extensions])`
* returns result object `{ ua: '', browser: {}, cpu: {}, device: {}, engine: {}, os: {} }`

Expand Down

0 comments on commit b814bcd

Please sign in to comment.