@react-native-firebase/firestore
Version:
React Native Firebase - Cloud Firestore is a NoSQL cloud database to store and sync data between your React Native application and Firebase's database. The API matches the Firebase Web SDK whilst taking advantage of the native SDKs performance and offline
17 lines (14 loc) • 365 B
JavaScript
/**
* @param {unknown} obj
* @returns {boolean}
*/
export function isPartialObserver(obj) {
const observerMethods = ['next', 'error', 'complete'];
if (typeof obj !== 'object' || obj == null) return false;
for (const method of observerMethods) {
if (method in obj && typeof obj[method] === 'function') {
return true;
}
}
return false;
}