2.1.2 • Published 2 years ago

combo-storage v2.1.2

Weekly downloads
440
License
MIT
Repository
github
Last release
2 years ago

combo-storage

Version Build Coverage Minified size Downloads 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

MethodLocalStorageSessionStorage
setLocalStorage.set(key, value)SessionStorage.set(key, value)
getLocalStorage.get(key)SessionStorage.get(key)
removeLocalStorage.remove(key)SessionStorage.remove(key)
сlearLocalStorage.clear()SessionStorage.clear()

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

Cookie methods

MethodExample
setCookie.set(name, value, days);
getCookie.get(name)
removeCookie.remove(name)

Contributing

Please read through our CONTRIBUTING.md.

2.1.2

2 years ago

2.1.1

2 years ago

2.1.0

2 years ago

2.0.4

4 years ago

2.0.3

4 years ago

2.0.2

4 years ago

2.0.1

4 years ago

2.0.0

4 years ago

1.1.3

4 years ago

1.1.1

4 years ago

1.1.2

4 years ago

1.1.0

4 years ago

1.0.0

4 years ago