Skip to content

localstorage & sessionStorage,developed by TypeScript

License

Notifications You must be signed in to change notification settings

way-jm/xr-storage

Folders and files

NameName
Last commit message
Last commit date
Apr 14, 2020
Jul 11, 2019
Apr 14, 2020
Apr 14, 2020
Jul 11, 2019
Jul 9, 2019
Jul 10, 2019
Jul 9, 2019
Jul 9, 2019
Jul 9, 2019
Jul 9, 2019
Jul 4, 2019
Jul 4, 2019
Jul 4, 2019
Apr 14, 2020
Jul 4, 2019
Mar 8, 2024
Jun 10, 2022
Jul 11, 2019
Jul 4, 2019
Jul 4, 2019

Repository files navigation

xr-storage

使用Typescript编写更加易用的localStorage和sessionStorage的API。

styled with prettier Travis Coveralls

安装

npm i xr-storage --save

import store from 'xr-storage'

2020年4月更新(Typescript支持)

支持在TypeScript中使用,可以获得使用规范和代码提示。

使用文档

documentation

关于单元测试

在本地编写了完整的单元测试,由于无法模拟node禁用cookies的方法,所以Store的12行的代码无法coverage,但是浏览器下已经测试过,没有问题

----------|----------|----------|----------|----------|-------------------|

File % Stmts % Branch % Funcs % Lines Uncovered Line #s
All files 89.47 80 100 98.53
Store.ts 85.45 77.78 100 97.87 12
helps.ts 100 100 100 100
index.ts 100 100 100 100
---------- ---------- ---------- ---------- ---------- -------------------

About

localstorage & sessionStorage,developed by TypeScript

Topics

Resources

License

Code of conduct

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published