Extensions Submodule > InApps > Notion
Notion
- Developer: Notion Labs, Inc.
- BrowserType:
inapp
User-Agent Examples
sh
Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_7) AppleWebKit/537.36 (KHTML, like Gecko) Notion/2.0.23 Chrome/91.0.4472.164 Electron/13.6.9 Safari/537.36Code Example
js
import { UAParser } from 'ua-parser-js';
import { InApps } from 'ua-parser-js/extensions';
import { Extension } from 'ua-parser-js/enums';
const appParser = new UAParser(InApps);
const browser = appParser.setUA('Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_7) AppleWebKit/537.36 (KHTML, like Gecko) Notion/2.0.23 Chrome/91.0.4472.164 Electron/13.6.9 Safari/537.36').getBrowser();
console.log(browser);
// {name: "Notion", version: "2.0.23", type: "inapp"}
// Compare using the built-in enum
const { InApp } = Extension.BrowserName;
console.log(browser.is(InApp.NOTION));
// true