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

1.0.0 • Public • Published

memory-web-storage

npm version npm

This is a library providing a singleton object with API similar to Web Storage:

  • getItem
  • setItem
  • removeItem
  • clear

default export

Mentioned singleton object.

createStorage(): MemoryStorage

Factory function creating memory storages.

testStorageSupport(type = 'local'): boolean

Meant to be used in browsers for testing storages support. It simply tries to perform most common operations on the storage object and wraps that with try/catch blocks.

Package Sidebar

Install

npm i memory-web-storage

Weekly Downloads

2,926

Version

1.0.0

License

MIT

Unpacked Size

4.81 kB

Total Files

5

Last publish

Collaborators

  • andarist