This is a clone of Firebase Realtime Database & Firestore in TypeScript/JS which stores the data in memory.
!!! At the moment, only the Firestore code is "fully" developed !!!
Installation
npm install fiery-firebase-memory
Example with default app (just like normal firebase)
firebase.initializeApp; ; // fs.app is available fs.doc'path/to/doc' .set; fs.collection'path/to' .where'values', '==', 'many' .orderBy'created_at' .onSnapshot;
Example with named app
;;
Where can I access the stored data?
- firestoreInstance._docs: an object of documents where the key is their full path
- firestoreInstance._collections: an object of collections (array of document ids) where the key is their full path
Currently Unsupported Functionality
- firebase#database
- firebase.app.App#auth
- firebase.app.App#database
- firebase.app.App#delete
- firebase.app.App#messaging
- firebase.app.App#storage
- firebase.firestore.Firestore#disableNetwork
- firebase.firestore.Firestore#enableNetwork
- firebase.firestore.Firestore#enablePersistence
- firebase.firestore.Firestore#setLogLevel
- firebase.firestore.FieldPath
- firebase.firestore.Transaction
- firebase.firestore.WriteBatch