get-firebase-ref
TypeScript icon, indicating that this package has built-in type declarations

1.1.1 • Public • Published

Get Firebase Ref

CircleCI NPM BundlePhobia

Get a Firebase ref to a firebase node from a query and firebase module (web, react-native or admin)

Install

  yarn add get-firebase-ref

Usage

Provides getFirebaseRef function as default and named exports

import { getFirebaseRef } from "get-firebase-ref";
import firebase from "firebase/app";
import "firebase/database";

const ref = getFirebaseRef({ firebase, path: "posts/", limitToFirst: 10 });

API

Input

A Firebase Query :

export interface FirebaseQuery {
  firebase?: any;
  path: string;
  orderByChild?: null | string;
  orderByKey?: null | any;
  orderByValue?: null | any;
  limitToFirst?: null | number;
  limitToLast?: null | number;
  startAt?: null | number;
  endAt?: null | number;
  equalTo?: null | any;
  keysOnly?: boolean;
  once?: boolean;
  isList?: boolean;
}

Output

A Firebase ref

Readme

Keywords

none

Package Sidebar

Install

npm i get-firebase-ref

Weekly Downloads

7

Version

1.1.1

License

MIT

Unpacked Size

6.45 kB

Total Files

5

Last publish

Collaborators

  • rakannimer