Learn about our RFC process, Open RFC meetings & more.Join in the discussion! »

combo-storage

2.0.4 • Public • Published

combo-storage

Version Build Coverage Minified size Downloads Dependabot PRs Welcome Tested with jest

Table of contents

Installation

You need to install package.

npm install combo-storage

Getting started

You should import the required storage to use the package

import { LocalStorage, SeessionStorage, Cookie } from 'combo-storage'

Then use the methods of storage. For example:

LocalStorage.set('user', 'awibox');

Base methods for LocalStorage and SessionStorage

Method LocalStorage SessionStorage
set LocalStorage.set(key, value) SessionStorage.set(key, value)
get LocalStorage.get(key) SessionStorage.get(key)
remove LocalStorage.remove(key) SessionStorage.remove(key)
сlear LocalStorage.clear() SessionStorage.clear()

Note: get and set methods are available for working with objects and arrays.

Cookie methods

Method Example
set Cookie.set(name, value, days);
get Cookie.get(name)
remove Cookie.remove(name)

Contributing

Please read through our CONTRIBUTING.md.

Install

npm i combo-storage

DownloadsWeekly Downloads

109

Version

2.0.4

License

MIT

Unpacked Size

21.1 kB

Total Files

18

Last publish

Collaborators

  • avatar