Cached Firebase
Cache Firebase data for offline storage.
- Uses localForage for performance (non-blocking async localStorage)
- Uses Promises
var CachedRef = ; var url = 'https://xxxx.firebaseio.com/your/url'; var ref = url timeout: 60000 // timeout before promise rejects value: null // initial value key: '...' // key in localStorage refisReady // loaded from localForage?refisReady; refisLoaded // loaded from Firebase?refloaded; refvalue; // current valueref; // saves current value CachedRefTIMEOUT = 60000; // default timeout
TODO
- Documentation
- Export CommonJS to global build (webpack)
- Check if bower installation works