Skip to content

Commit 7f71024

Browse files
authored
Fix documentation
`readme.md` refers to a `parser.getResults` function, which does not exist. This PR corrects the function name to `getResult`.
1 parent d11fc47 commit 7f71024

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

readme.md

+2-2
Original file line numberDiff line numberDiff line change
@@ -36,7 +36,7 @@ Like so:
3636
```js
3737
let parser = new UAParser("user-agent"); // you need to pass the user-agent for nodejs
3838
console.log(parser); // {}
39-
let parserResults = parser.getResults();
39+
let parserResults = parser.getResult();
4040
console.log(parserResults);
4141
/** {
4242
"ua": "",
@@ -48,7 +48,7 @@ console.log(parserResults);
4848
} */
4949
```
5050

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

0 commit comments

Comments
 (0)