storage-ts
TypeScript icon, indicating that this package has built-in type declarations

0.1.4 • Public • Published

storage

description

SessionStorage is used by default unless you specify 'local' in the parameter specified.

usage

Storage.clear()

Storage.clear() is equivalent to sessionStorage.clear().

If you want to use localStorage, you only need to pass the parameter to the string 'local'.

Storage.clear('local') is equivalent to localStorage.clear().

Storage.getItem(key)

Storage.getItem(key) is equivalent to sessionStorage.getItem(key).

Storage.getItem(key, 'local') is equivalent to localStorage.getItem(key).

Package Sidebar

Install

npm i storage-ts

Weekly Downloads

2

Version

0.1.4

License

MIT

Unpacked Size

3.71 kB

Total Files

4

Last publish

Collaborators

  • dearsen