Home

Awesome

Firebase

VS Code Firebase and Firestore snippets


Version Installs Downloads

Supported Languages

Snippets

Firebase

TriggerDescription
fireconfigConfigure Firebase
firereferenceGet a reference to the firebase service
firesetSet data to the firebase database
fireretrieveRetrieve data from firebase
fireretrieveloopRetrieve data and loop inside the direct children
firevalUsing val() method to retrieve the data inside a listener
fireretrieveonceRetrieve data once
firekeyCreate a key and simultaneously retrieve the key
fireupdateUpdating specific fields
fireremoveRemove data at a certain location
firetransactionfirebase transactions
fireorderBychildOrder results by the value of a specified child key or nested child path
fireorderByvalueOrder results by child values
fireorderBykeyOrder results by child keys
firelimittofirstSets the maximum number of items to return from the end of the ordered list of results
firelimittolastSets the maximum number of items to return from the beginning of the ordered list of results
firestartAtReturn items greater than or equal to the specified key or value, depending on the order-by method chosen
fireendatReturn items less than or equal to the specified key or value, depending on the order-by method chosen
fireequaltoReturn items equal to the specified key or value, depending on the order-by method chosen
fireexistsReturns true if this dataSnapshot contains any data
firehaschildReturns true if this datasnapshot contains the specified child
firehaschildrenReturns true is this datasnapshot contains any children
firenumchildrenReturns the number of child properties of this datasnapshot
firedetachRemoving a listener
firestoragerefGet a reference to the storage service, which is used to create references in your storage bucket
firestoragechildrefCreate a reference to a location lower in the tree, say images.jpg
firestorageurlrefCreate a reference from a Google Cloud Storage URI or https url
firestoragedownloadfileGetting the download file from firebase storage
firestoragedeletefileDelete a file
firesignupemailAuthenticate a new user using email and password
firesigninemailSign in an existing user
fireauthstateAttach an observer using onAuthStateChanged to retrieve user infomration
firecurrentuserRetrieves the currently logged in user
fireuserprofileRetrieves the user information
fireupdateprofileUpdates the user profile
fireproviderinfoRetrieves information from sign in provider
fireupdateemailSet a user email address, the user must have signed in recently
fireemailverifySend an email verification to the user
firesetpassSet a user password, the user must have signed in recently
firepassresetSend a password reset email to a user
firedeleteuserDelete a user account with the delete method
firesignoutSign out the user
firegoogleinstanceGet instance of the google provider
fireprovidersigninSign in with google
firefacebookinstanceGet instance of facebook provider
firetwitterinstanceGet instance of twitter provider
firegithubinstanceGet instance of github provider
firecustomauthSign in the user using custom authentication
fireanonymouslySign in the user anonymously

Firestore

TriggerDescription
initializefirestoreInitialize Cloud Firestore through Firebase
adddatafirestoreCreating a new collection and document in firestore
setdatafirestoreCreates or overwrite a single document, use the set() method
readdatafirestoreRead data from a collection in firestore
referencefirestoreAdd firestore reference
updatefirestoreUpdate the document in firestore
deletedocfirestoreDelete a document in firestore
deletefieldfirestoreDelete a field in firestore document
wherefirestorewhere query in firestore
arraycontainsfirestoreUsing array-contains it filters based on array value
limitfirestoreRetrieves the first three value of the field
ordermultifirestoreOrder by multiple fields in firestore
realtimeupdatefirestoreListens for realtime changes on a document using onSnapshot
arrayunionfieldfirestoreAdds an element to an array field
arrayremovefieldfirestoreRemove an element from array field
incrementfieldfirestoreIncrement or decrement a numeric field value