Skip to content
This repository was archived by the owner on Apr 4, 2023. It is now read-only.

Commit 3f2e277

Browse files
Docs++
1 parent 50e37e9 commit 3f2e277

File tree

1 file changed

+2
-14
lines changed

1 file changed

+2
-14
lines changed

docs/DATABASE.md

Lines changed: 2 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -11,26 +11,14 @@ Since this is the most likely feature you'll use with this plugin it has already
1111
## Functions
1212

1313
### init
14-
Optionally you can pass `persist` to the `init` function to make Firebase save data to the local disc so it will work in offline scenario's. Defaul false.
14+
You can optionally pass `persist` to the `init` function to make Firebase save data to the local disc so it will work in offline scenario's. Default `false`.
1515

1616
```js
17-
var firebase = require("nativescript-plugin-firebase");
18-
1917
firebase.init({
2018
persist: true
21-
}).then(
22-
function (instance) {
23-
console.log("firebase.init done");
24-
},
25-
function (error) {
26-
console.log("firebase.init error: " + error);
27-
}
28-
);
19+
});
2920
```
3021

31-
All further examples assume `firebase` has been required.
32-
Also, all functions support promises, but we're leaving out the `.then()` stuff for brevity where it doesn't add value.
33-
3422
### setValue
3523
Data is stored as JSON data at a specific path (which is appended to the URL you passed to `init`).
3624
If you want to add data to a known path use this, otherwise use `push` (see below).

0 commit comments

Comments
 (0)