src/index.js
function isPrivateBrowsingMode () {
  try {
    localStorage.setItem(TEST_KEY, '1')
    localStorage.removeItem(TEST_KEY)
    return false
  } catch (error) {
    return true
  }
}
function isPrivateBrowsingMode () {
  try {
    localStorage.setItem(TEST_KEY, '1')
    localStorage.removeItem(TEST_KEY)
    return false
  } catch (error) {
    return true
  }
}
function isPrivateBrowsingMode ( ) { try { localStorage . setItem ( TEST_KEY , '1' ) localStorage . removeItem ( TEST_KEY ) return false } catch ( error ) { return true } }
Check browser is in private browsing mode or not

@return {Boolean}
Check browser is in private browsing mode or not