return item != null ? (JSON.parse(item) as T) : defaultValue
}
-export const removeFromLocalStorage = (key: string): void => {
+export const deleteFromLocalStorage = (key: string): void => {
localStorage.removeItem(key)
}
import Container from '@/components/Container.vue'
import ReloadButton from '@/components/buttons/ReloadButton.vue'
import {
+ deleteFromLocalStorage,
getFromLocalStorage,
getLocalStorage,
randomUUID,
- removeFromLocalStorage,
setToLocalStorage
} from '@/composables'
import ToggleButton from '@/components/buttons/ToggleButton.vue'
const clearToggleButtons = (): void => {
for (const key in getLocalStorage()) {
if (key.includes('toggle-button')) {
- removeFromLocalStorage(key)
+ deleteFromLocalStorage(key)
}
}
}