firebase-admin-util

4.3.0 • Public • Published

firebase-admin-util

Documentation

http://krajiyah.github.io/firebase-admin-util

Notes

  1. schema must be in following format:
{
  "User": {
      "path": "Users",
      "fields": {
        "name": "string",
        "image": "link",
        "age": "number",
        "isAdmin": "boolean",
        "meta": "object",
        "dogs": "array:Dogs",
        "cat": "string:Cats"
      }
  },
  "Dog": {
    "path": "SomeNode/SomeNode/Dogs",
    "fields": {
      "name": "string",
      "user": "string:Users"
    }
  },
  "Cat": {
    "path": "SomeNode/Cats",
    "fields": {
      "name": "string",
      "user": "string:Users"
    }
  }
}
  1. Example usage:
const User = require("firebase-admin-util")(firebase, schema).db.User;
User.getByKey("some key").then(function(user) {
  // do stuff with User object fetched
});

Readme

Keywords

none

Package Sidebar

Install

npm i firebase-admin-util

Weekly Downloads

2

Version

4.3.0

License

ISC

Unpacked Size

1.22 MB

Total Files

53

Last publish

Collaborators

  • krajiyah