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

1.0.0 • Public • Published

object-storage-factory

npm types minzip downloads per month issues license

Object storage factory implemented with the same interface as the browser's local storage.

documentation

If you want to get more information about library, just take a look at markdown documentation: API Documentation.

installation

yarn add object-storage-factory
npm install object-storage-factory

example

const { objectStorageFactory } = require('object-storage-factory');

const objectStorage = objectStorageFactory();

objectStorage.setItem('key', 'value');
objectStorage.getItem('key'); // value
objectStorage.getItem('wrong_key'); // null

usage

Useful when you will not be able to use localStorage or sessionStorage due to security or other thrown error.

license

MIT

Package Sidebar

Install

npm i object-storage-factory

Weekly Downloads

7

Version

1.0.0

License

MIT

Unpacked Size

43.1 kB

Total Files

38

Last publish

Collaborators

  • playerony