Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/renzp94/storage
storage helper
https://github.com/renzp94/storage
localstorage localstorage-helper
Last synced: 3 months ago
JSON representation
storage helper
- Host: GitHub
- URL: https://github.com/renzp94/storage
- Owner: renzp94
- Created: 2022-11-08T11:52:49.000Z (about 2 years ago)
- Default Branch: main
- Last Pushed: 2024-08-05T02:52:37.000Z (6 months ago)
- Last Synced: 2024-10-06T07:45:56.669Z (4 months ago)
- Topics: localstorage, localstorage-helper
- Language: TypeScript
- Homepage:
- Size: 868 KB
- Stars: 1
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- Changelog: CHANGELOG.md
Awesome Lists containing this project
README
# storage
一款零依赖、快速灵活、简单易用的localStorage API库
## 安装
```sh
npm install @renzp/storage
```# 使用
```ts
import storage from '@renzp/storage'const token = 'WEB_TOKEN'
// 设置值
storage.set(token, 'UwhbBh1qzxHXMetSIRI3mQ1X')
// 获取值
const test = storage.get(token)
// 清除值
storage.remove(token)
```