Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.
async function clearUsageData() {
// clear local storage
localStorage.removeItem("foreignFills");
localStorage.removeItem("recent");
Object.keys(localStorage).forEach(key => {
if (key.startsWith("recent:")) {
localStorage.removeItem(key);
}
});
// clear Indexed DB
await idb.deleteDB("browserpass");
}