https://github.com/deblanco/polybase-db
Polymer 3 element - Implementation of Firebase Realtime Database
https://github.com/deblanco/polybase-db
firebase firebase-db javascript polymer-3 polymer-element
Last synced: 4 months ago
JSON representation
Polymer 3 element - Implementation of Firebase Realtime Database
- Host: GitHub
- URL: https://github.com/deblanco/polybase-db
- Owner: deblanco
- License: mit
- Created: 2017-12-07T18:28:00.000Z (over 8 years ago)
- Default Branch: master
- Last Pushed: 2017-12-07T23:10:47.000Z (over 8 years ago)
- Last Synced: 2025-10-26T02:46:36.733Z (8 months ago)
- Topics: firebase, firebase-db, javascript, polymer-3, polymer-element
- Language: JavaScript
- Homepage:
- Size: 11.7 KB
- Stars: 1
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# Polybase-db
A wrapper for Firebase Realtime Database made in Polymer 3.
It auto-updates/fetch data in each update that Firebase notifies, also has methods for add/update/remove.
## Configuration
You should setup a configuration file with the settings attached below or set it after the import (of course, erase the import then).
```javascript
var config = {
apiKey: "apiKey",
authDomain: "projectId.firebaseapp.com",
databaseURL: "https://databaseName.firebaseio.com"
}
````
## Methods
- toArray(): Yes, because Firebase will storage the data as a JSON and JSONs not are actually an array, so this element has a built-in translator that translates each key to a array position:
```json
{
"one": {
"name": "foo"
},
"two": {
"name": "bar"
}
}
```
will be
```javascript
[
{ id: "one", name: "foo" },
{ id: "two", name: "bar" }
] // keys name will be moved inside the property "id"
```
WIP...
---
License: MIT
2017 - Daniel Blanco Parla