Releases: codecubers/web-client-store
Cleanup
v2.0.3 - CacheStorage
With CachceStorage class now we can have a way of caching/uncaching responses saved in Indexed storage.
Support all localforage properties; sanity check key
Added additional support to Index db (localforage) to support all other properites:
- clearAsync() - to clear all keys at once
- lengthAsync() - to get the length of the keys
- getKeyAtAsync() - get a key by it's index
- getAllKeysAsync() - get all keys
- forEachAsync() - iterate over all the keys
Also, added sanity check for supplied key value in all the storage classes. A key 'undefined' cannot be stored anymore.
SessionStorage property issue fix
Using correct properties for sessionStorage and also added .clear() method.
Typescript & IndexDb support
Initial design of centralized const of all methods is bit clunky and hence re-wrote entire library using Typescript (inspiration from repo davutg/client-store) and exposed each storage class in an individual class.
Types of Session and IndexDb properties
Added type definitions for missing Session storage and indexDB properties
Cookies and Local Storage
Though all four types of storage (Cookies, Local Storage, Session, IndexDB) are supported in store.js, the types are only available for Cookie and Local Storage in this first release. In upcoming release all storage types will be type supported.