NOT_A_BROWSER when invoked outside a browser-like environment.
UNSUPPORTED_BROWSER when the browser was classified as unknown and
no fallback strategy applied.PROBE_FAILED when every applicable strategy threw before producing a
definitive answer.TIMEOUT when timeoutMs elapsed before a verdict was reached.ABORTED when the supplied signal was aborted.import { detectIncognito } from 'is-incognito-mode';
const { isPrivate, browser, confidence, quota } = await detectIncognito();
console.log(`${browser} (${confidence} confidence, quota: ${quota ?? '?'})`);
Detect whether the current browser is in private / incognito mode.
Returns a rich DetectionResult. Most callers want the thinner isIncognito convenience instead.