|
| 1 | +# Firebase |
| 2 | +## VS Code Firebase and Firestore snippets |
| 3 | +------------------- |
| 4 | +[](https://marketplace.visualstudio.com/items?itemName=peterhdd.firebase-firestore-snippets) |
| 5 | + |
| 6 | +## Supported Languages |
| 7 | +* JavaScript (.js) |
| 8 | +* TypeScript (.ts) |
| 9 | +* JavaScript React (.jsx) |
| 10 | +* TypeScript React (.tsx) |
| 11 | +* Html (.html) |
| 12 | +* Vue (.vue) |
| 13 | + |
| 14 | +## Snippets |
| 15 | + |
| 16 | +### Firebase |
| 17 | +| Trigger | Description | |
| 18 | +| -------: | ------- | |
| 19 | +| `fireconfig` | Configure Firebase | |
| 20 | +| `firereference` | Get a reference to the firebase service | |
| 21 | +| `fireset` | Set data to the firebase database | |
| 22 | +| `fireretrieve` | Retrieve data from firebase | |
| 23 | +| `fireretrieveloop` | Retrieve data and loop inside the direct children | |
| 24 | +| `firebaseval` | Using `val()` method to retrieve the data inside a listener | |
| 25 | +| `fireretrieveonce` | Retrieve data once | |
| 26 | +| `firekey` | Create a key and simultaneously retrieve the key | |
| 27 | +| `fireupdate` | Updating specific fields | |
| 28 | +| `fireremove` | Remove data at a certain location | |
| 29 | +| `firetransaction` | firebase transactions | |
| 30 | +| `fireorderBychild` | Order results by the value of a specified child key or nested child path | |
| 31 | +| `fireorderByvalue` | Order results by child values | |
| 32 | +| `fireorderBykey` | Order results by child keys | |
| 33 | +| `firelimittofirst` | Sets the maximum number of items to return from the end of the ordered list of results | |
| 34 | +| `firelimittolast` | Sets the maximum number of items to return from the beginning of the ordered list of results | |
| 35 | +| `firestartAt"` | Return items greater than or equal to the specified key or value, depending on the order-by method chosen | |
| 36 | +| `fireendat` | Return items less than or equal to the specified key or value, depending on the order-by method chosen | |
| 37 | +| `fireequalto` | Return items equal to the specified key or value, depending on the order-by method chosen | |
| 38 | +| `fireexists` | Returns true if this dataSnapshot contains any data | |
| 39 | +| `firehaschild` | Returns true if this datasnapshot contains the specified child | |
| 40 | +| `firehaschildren` | Returns true is this datasnapshot contains any children | |
| 41 | +| `firenumchildren` | Returns the number of child properties of this datasnapshot | |
| 42 | +| `firedetach` | Removing a listener | |
| 43 | +| `firestorageref` |Get a reference to the storage service, which is used to create references in your storage bucket | |
| 44 | +| `firestoragechildref` | Create a reference to a location lower in the tree, say `images.jpg` | |
| 45 | +| `firestorageurlref` | Create a reference from a Google Cloud Storage URI or https url | |
| 46 | +| `firestoragedownloadfile` | Getting the download file from firebase storage | |
| 47 | +| `firestoragedeletefile` | Delete a file | |
| 48 | +| `firesignupemail` | Authenticate a new user using email and password | |
| 49 | +| `firesigninemail` | Sign in an existing user | |
| 50 | +| `fireauthstate` | Attach an observer using onAuthStateChanged to retrieve user infomration | |
| 51 | +| `firecurrentuser` | Retrieves the currently logged in user | |
| 52 | +| `fireuserprofile` | Retrieves the user information | |
| 53 | +| `fireupdateprofile` | Updates the user profile | |
| 54 | +| `fireproviderinfo` | Retrieves information from sign in provider | |
| 55 | +| `fireupdateemail` | Set a user email address, the user must have signed in recently| |
| 56 | +| `fireemailverify` | Send an email verification to the user | |
| 57 | +| `firesetpass` | Set a user password, the user must have signed in recently | |
| 58 | +| `firepassreset` | Send a password reset email to a user | |
| 59 | +| `firedeleteuser` | Delete a user account with the delete method | |
| 60 | +| `firesignout` | Sign out the user | |
| 61 | +| `firegoogleinstance` | Get instance of the google provider | |
| 62 | +| `fireprovidersignin` | eSign in with google | |
| 63 | +| `firefacebookinstance` | Get instance of facebook provider | |
| 64 | +| `firetwitterinstance` | Get instance of twitter provider | |
| 65 | +| `firegithubinstance` | Get instance of github provider | |
| 66 | +| `firecustomauth` | Sign in the user using custom authentication | |
| 67 | + |
| 68 | +### Firestore |
| 69 | +| Trigger | Description | |
| 70 | +| -------: | ------- | |
| 71 | +| `initializefirestore` | Initialize Cloud Firestore through Firebase | |
| 72 | +| `adddatafirestore` | Creating a new collection and document in firestore | |
| 73 | +| `readdatafirestore` | Read data from a collection in firestore | |
| 74 | +| `referencefirestore` | Add firestore reference | |
| 75 | +| `updatefirestore` | Update the document in firestore | |
| 76 | +| `deletedocfirestore` | Delete a document in firestore | |
| 77 | +| `deletefieldfirestore` | Delete a field in firestore document | |
| 78 | +| `wherefirestore` | where query in firestore | |
| 79 | +| `limitfirestore` | Retrieves the first three value of the field | |
| 80 | +| `ordermultifirestore` | Order by multiple fields in firestore | |
| 81 | + |
0 commit comments