conbo-cordova-nativestorage
v1.0.3
Published
Persistent storage classes for hybrid ConboJS apps using cordova-plugin-nativestorage
Readme
NativeStorage classes for hybrid apps using ConboJS
This library contains persistent storage classes for hybrid ConboJS apps using
cordova-plugin-nativestorage, as an alternative to ConboJS's built-in
LocalStorage related classes.
NativeHashis a direct replacement forLocalHash; andNativeListis a direct replacement forLocalList
Any data currently saved to LocalStorage by a LocalHash or LocalList with
the same name will automatically be migrated to NativeStorage on first use.
Installation
cordova plugin add cordova-plugin-nativestorage
npm i conbo-cordova-nativestorageUsage
Use of the classes in this library is almost identical to ConboJS's built-in
LocalStorage related classes, see https://conbo.mesmotronic.com/, although
you should wait until the 'ready' event has fired (usually just a few
milliseconds after Cordova's 'deviceready' event) before interacting with
instances of classes in this library, for example:
let list = new NativeList({name:'myList'});
list.addEventListener('ready', () => console.log('Your native list is ready to go!'));
// or
let list = await NativeList.create({name:'myList'});
// or
NativeList.create({name:'myList'}).then(list =>
{
this.list = list;
console.log('Your native list is ready to go!'));
});