From 7f71024161399b7aa5d5cd10dba9e059f0218262 Mon Sep 17 00:00:00 2001 From: Riley Shaw Date: Wed, 26 Oct 2022 13:17:33 -0400 Subject: [PATCH] Fix documentation `readme.md` refers to a `parser.getResults` function, which does not exist. This PR corrects the function name to `getResult`. --- readme.md | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/readme.md b/readme.md index 185a2f9c..71bb1879 100644 --- a/readme.md +++ b/readme.md @@ -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": "", @@ -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: {} }`