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.

Versions

Current Tags

  • Version
    Downloads (Last 7 Days)
    • Tag
  • 1.0.0
    207
    • latest

Version History

  • Version
    Downloads (Last 7 Days)
    • Published
  • 1.0.0
    207
  • 0.1.0
    2,875
  • 0.0.1
    0

Package Sidebar

Install

npm i memory-web-storage

Weekly Downloads

2,544

Version

1.0.0

License

MIT

Unpacked Size

4.81 kB

Total Files

5

Last publish

Collaborators

  • andarist