@@ -25,7 +25,7 @@ import { firebaseConfig } from '../../config';
25
25
import { joinPath , pathParts } from '../../utilities/path' ;
26
26
27
27
/**
28
- * Interface representing a Firebase Realtime Database data snapshot.
28
+ * Interface representing a Firebase Realtime database data snapshot.
29
29
*/
30
30
export class DataSnapshot implements firebase . database . DataSnapshot {
31
31
public instance : string ;
@@ -44,7 +44,7 @@ export class DataSnapshot implements firebase.database.DataSnapshot {
44
44
45
45
constructor (
46
46
data : any ,
47
- path ?: string , // path will be undefined for the database root
47
+ path ?: string , // path is undefined for the database root
48
48
private app ?: firebase . app . App ,
49
49
instance ?: string
50
50
) {
@@ -72,7 +72,7 @@ export class DataSnapshot implements firebase.database.DataSnapshot {
72
72
73
73
/**
74
74
* Returns a [`Reference`](/docs/reference/admin/node/admin.database.Reference)
75
- * to the Database location where the triggering write occurred. Has
75
+ * to the database location where the triggering write occurred. Has
76
76
* full read and write access.
77
77
*/
78
78
get ref ( ) : firebase . database . Reference {
@@ -92,10 +92,10 @@ export class DataSnapshot implements firebase.database.DataSnapshot {
92
92
/**
93
93
* The key (last part of the path) of the location of this `DataSnapshot`.
94
94
*
95
- * The last token in a Database location is considered its key. For example,
95
+ * The last token in a database location is considered its key. For example,
96
96
* "ada" is the key for the `/users/ada/` node. Accessing the key on any
97
- * `DataSnapshot` will return the key for the location that generated it.
98
- * However, accessing the key on the root URL of a Database will return `null`.
97
+ * `DataSnapshot` returns the key for the location that generated it.
98
+ * However, accessing the key on the root URL of a database returns `null`.
99
99
*/
100
100
get key ( ) : string | null {
101
101
const segments = pathParts ( this . _fullPath ( ) ) ;
@@ -111,7 +111,7 @@ export class DataSnapshot implements firebase.database.DataSnapshot {
111
111
* return `null`, indicating that the `DataSnapshot` is empty (contains no
112
112
* data).
113
113
*
114
- * @return The DataSnapshot 's contents as a JavaScript value (Object,
114
+ * @return The snapshot 's contents as a JavaScript value (Object,
115
115
* Array, string, number, boolean, or `null`).
116
116
*/
117
117
val ( ) : any {
@@ -189,13 +189,13 @@ export class DataSnapshot implements firebase.database.DataSnapshot {
189
189
* JavaScript object returned by `val()` is not guaranteed to match the ordering
190
190
* on the server nor the ordering of `child_added` events. That is where
191
191
* `forEach()` comes in handy. It guarantees the children of a `DataSnapshot`
192
- * will be iterated in their query order.
192
+ * can be iterated in their query order.
193
193
*
194
194
* If no explicit `orderBy*()` method is used, results are returned
195
195
* ordered by key (unless priorities are used, in which case, results are
196
196
* returned by priority).
197
197
*
198
- * @param action A function that will be called for each child `DataSnapshot`.
198
+ * @param action A function that is called for each child `DataSnapshot`.
199
199
* The callback can return `true` to cancel further enumeration.
200
200
*
201
201
* @return `true` if enumeration was canceled due to your callback
@@ -227,7 +227,7 @@ export class DataSnapshot implements firebase.database.DataSnapshot {
227
227
* You can use `hasChildren()` to determine if a `DataSnapshot` has any
228
228
* children. If it does, you can enumerate them using `forEach()`. If it
229
229
* doesn't, then either this snapshot contains a primitive value (which can be
230
- * retrieved with `val()`) or it is empty (in which case, `val()` will return
230
+ * retrieved with `val()`) or it is empty (in which case, `val()` returns
231
231
* `null`).
232
232
*
233
233
* @return `true` if this snapshot has any children; else `false`.
0 commit comments