voluptasmollitia
Version:
Monorepo for the Firebase JavaScript SDK
18 lines (10 loc) • 504 B
Markdown
<!-- Do not edit this file. It is automatically generated by API Documenter. -->
[Home](./index.md) > [@firebase/database](./database.md) > [DataSnapshot](./database.datasnapshot.md) > [exists](./database.datasnapshot.exists.md)
## DataSnapshot.exists() method
Returns true if this `DataSnapshot` contains any data. It is slightly more efficient than using `snapshot.val() !== null`<!-- -->.
<b>Signature:</b>
```typescript
exists(): boolean;
```
<b>Returns:</b>
boolean