is-incognito-mode
👤Function to identify whether browser is in incognito mode 👀
How to use
To install library:
# yarn yarn add is-incognito-mode # npm npm install is-incognito-mode --save
// ES6 modules; // CommonJS modulesconst isIncognito = default; /* Function returns Promise, which could be: - resolved with true, if Incognito mode is opened - resolved with false, if regular window is opened - rejected if no possibility to identify*/
Demo
Incognito Window | Regular Window |
---|---|
API
isIncognito: Promise<boolean>
Result Promise
is
- resolved with
true
, if Incognito mode is opened. - resolved with
false
, if regular window is opened - rejected if no possibility to identify
Contributing
is-incognito-mode
is open-source library, opened for contributions
License
is-incognito-mode
is MIT licensed