link
https://kennana.github.io/toolkit-use/
Determine if Storage is supported
import { ToolkitUseStorage } from 'toolkit-use'
ToolkitUseStorage.isSupportStorage()
Set Storage
import { ToolkitUseStorage } from 'toolkit-use'
ToolkitUseStorage.setStorage(key, value, expire = 0)
Get Storage
import { ToolkitUseStorage } from 'toolkit-use'
ToolkitUseStorage.getStorage(key)
Check if Storage exists
import { ToolkitUseStorage } from 'toolkit-use'
ToolkitUseStorage.hasStorage(key)
Get all keys
import { ToolkitUseStorage } from 'toolkit-use'
ToolkitUseStorage.getStorageKeys()
Get key by index
import { ToolkitUseStorage } from 'toolkit-use'
ToolkitUseStorage.getStorageForIndex(index)
Get length of localStorage
import { ToolkitUseStorage } from 'toolkit-use'
ToolkitUseStorage.getStorageLength()
Get all storage items
import { ToolkitUseStorage } from 'toolkit-use'
ToolkitUseStorage.getStorageAll()
Remove storage item
import { ToolkitUseStorage } from 'toolkit-use'
ToolkitUseStorage.removeStorage(key)
Clear storage
import { ToolkitUseStorage } from 'toolkit-use'
ToolkitUseStorage.clearStorage()
Automatically add prefix to name
import { ToolkitUseStorage } from 'toolkit-use'
ToolkitUseStorage.autoAddPrefix(key)
Remove previously added prefix
import { ToolkitUseStorage } from 'toolkit-use'
ToolkitUseStorage.autoRemovePrefix(key)
Encryption method
import { ToolkitUseStorage } from 'toolkit-use'
ToolkitUseStorage.encrypt(data)
Decryption method
import { ToolkitUseStorage } from 'toolkit-use'
ToolkitUseStorage.decrypt(data)
Top comments (0)