ua-parser-js
ua-parser-js copied to clipboard
Can getResult() use withClientHints() ?
Can getResult() use withClientHints() ?
Trying to avoid a duplicate call. Doing a getResult(), and then overlaying the result with the browser information from GetBrowser().withClientHints() seems like it should/could be simpler?
Thanks
Hi, there's actually no need to overlay the result as you can directly chain getResult() with withClientHints():
const uap = new UAParser();
const res = await uap.getResult().withClientHints();