code: function isPrivateBrowsingMode () {
    try {
      localStorage.setItem(TEST_KEY, '1')
      localStorage.removeItem(TEST_KEY)
      return false
    } catch (error) {
      return true
    }
  }
docs: Check browser is in private browsing mode or not
  
  @return {Boolean}