Giter Club home page Giter Club logo

xr-storage's Introduction

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
---------- ---------- ---------- ---------- ---------- -------------------

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.