dist/index.js
function offValue(dbRef) {
		var storageKey = getStorageKeyFromDbRef(dbRef, 'value');

		//Turn listener off.
		dbRef.off();

		return new Promise(function (resolve, reject) {
			if (storageKey in snapPeak) {
				var dataToCache = snapPeak[storageKey];
				delete snapPeak[storageKey];
				resolve(_reactNative.AsyncStorage.setItem(storageKey, dataToCache));
			} else {
				resolve(null);
			}
		});
	}
function offValue(dbRef) {
		var storageKey = getStorageKeyFromDbRef(dbRef, 'value');

		//Turn listener off.
		dbRef.off();

		return new Promise(function (resolve, reject) {
			if (storageKey in snapPeak) {
				var dataToCache = snapPeak[storageKey];
				delete snapPeak[storageKey];
				resolve(_reactNative.AsyncStorage.setItem(storageKey, dataToCache));
			} else {
				resolve(null);
			}
		});
	}
function offValue ( dbRef ) { var storageKey = getStorageKeyFromDbRef ( dbRef , 'value' ) ; //Turn listener off. dbRef . off ( ) ; return new Promise ( function ( resolve , reject ) { if ( storageKey in snapPeak ) { var dataToCache = snapPeak [ storageKey ] ; delete snapPeak [ storageKey ] ; resolve ( _reactNative . AsyncStorage . setItem ( storageKey , dataToCache ) ) ; } else { resolve ( null ) ; } } ) ; }
Remove any listeners from the specified ref, and save any existing data to the cache.
@param {firebase.database.Reference} dbRef Firebase database reference to clear.
@returns {Promise} Promis that will resolve after listener is switched off and cache has been written.
Remove any listeners from the specified ref and save any existing data to the cache .