npm.io
1.0.1 • Published 2 years ago

@renzp/storage

Licence
MIT
Version
1.0.1
Deps
1
Size
3 kB
Vulns
0
Weekly
0
Stars
1

storage logo

Bundle size Downloads Version License

storage

一款零依赖、快速灵活、简单易用的localStorage API库

安装

npm install @renzp/storage

使用

import storage from '@renzp/storage'

const token = 'WEB_TOKEN'

// 设置值
storage.set(token, 'UwhbBh1qzxHXMetSIRI3mQ1X')
// 获取值
const test = storage.get<string>(token)
// 清除值
storage.remove(token)

Keywords