Instant Firestore
Firebase Firestore ORM to ease common tasks, such as creating, finding, updating and deleting documents.
Please note: This is an unofficial Firestore package, designed to assist with common Firestore tasks.
Table of Contents
Installation
You can install this package using npm:
$ npm install instant-firestore
Usage
Here is a quick example to get you started:
ES Modules
; // Pass your firestore instance and a collection reference to the constructorconst fr = db db; const data await = fr;console;
CommonJS Modules
var FirestoreRepository = FirestoreRepository; // Pass your firestore instance and a collection reference to the constructorvar fr = db db; fr;
API
create
Create a Firestore document.
Arguments
attributes (Object)
: The document attributes.
options (Object):
Options.
Returns
(Object)
: The serialized document
createMany
find
findOne
findById
createWithId
update
delete
updateOrCreate
Contributing
We'd greatly appreciate any contribution you make.