mirror of
https://github.com/ragestudio/comty.git
synced 2025-06-10 02:54:15 +00:00
added deleteInternalStorage
util
This commit is contained in:
parent
67534db953
commit
dd9ce20338
15
packages/app/src/utils/deleteInternalStorage/index.js
Normal file
15
packages/app/src/utils/deleteInternalStorage/index.js
Normal file
@ -0,0 +1,15 @@
|
||||
import cookies from "js-cookie"
|
||||
|
||||
export default () => {
|
||||
window.localStorage.clear()
|
||||
window.sessionStorage.clear()
|
||||
|
||||
// delete all cookies
|
||||
const allCookies = cookies.get()
|
||||
|
||||
for (const cookieName in allCookies) {
|
||||
cookies.remove(cookieName)
|
||||
}
|
||||
|
||||
location.reload()
|
||||
}
|
@ -3,4 +3,5 @@ export { default as findChildById } from "./findChildById"
|
||||
export { default as cursorPosition } from "./cursorPosition"
|
||||
export { default as getBase64 } from "./getBase64"
|
||||
export { default as Haptics } from "./haptics"
|
||||
export { default as processString } from "./processString"
|
||||
export { default as processString } from "./processString"
|
||||
export { default as deleteInternalStorage } from "./deleteInternalStorage"
|
Loading…
x
Reference in New Issue
Block a user