Extensions Submodule > Fetchers > WhatsApp
WhatsApp
- Developer: Meta
- BrowserType:
fetcher
User-Agent Examples
sh
WhatsApp/2.23.20.0Code Example
js
import { UAParser } from 'ua-parser-js';
import { Fetchers } from 'ua-parser-js/extensions';
import { Extension } from 'ua-parser-js/enums';
const fetcherParser = new UAParser(Fetchers);
const browser = fetcherParser.setUA('WhatsApp/2.23.20.0').getBrowser();
console.log(browser);
// {name: "WhatsApp", version: "2.23.20.0", major: "2", type: "fetcher"}
// Compare using the built-in enum
const { Fetcher } = Extension.BrowserName;
console.log(browser.is(Fetcher.META_WHATSAPP));
// true