Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/rakannimer/get-firebase-ref
Get a Firebase ref from a query and firebase module (web or admin)
https://github.com/rakannimer/get-firebase-ref
Last synced: 12 days ago
JSON representation
Get a Firebase ref from a query and firebase module (web or admin)
- Host: GitHub
- URL: https://github.com/rakannimer/get-firebase-ref
- Owner: rakannimer
- Created: 2018-10-05T16:23:00.000Z (over 6 years ago)
- Default Branch: master
- Last Pushed: 2018-10-07T12:34:08.000Z (over 6 years ago)
- Last Synced: 2025-01-18T06:51:01.795Z (about 1 month ago)
- Language: TypeScript
- Size: 77.1 KB
- Stars: 1
- Watchers: 3
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# Get Firebase Ref
[![CircleCI][circleci-badge]][circleci-href]
[![NPM][npm-version-badge]][npm-href]
[![BundlePhobia][bundlephobia-badge]][bundlephobia-href]Get a Firebase ref to a firebase node from a query and firebase module (web, react-native or admin)
## Install
```sh
yarn add get-firebase-ref
```## Usage
Provides getFirebaseRef function as default and named exports
```typescript
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 :
```typescript
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
[circleci-href]: https://circleci.com/gh/rakannimer/get-firebase-ref
[circleci-badge]: https://img.shields.io/circleci/project/github/rakannimer/get-firebase-ref.svg
[npm-href]: https://www.npmjs.com/package/get-firebase-ref
[npm-version-badge]: https://img.shields.io/npm/v/get-firebase-ref.svg
[npm-license-badge]: https://img.shields.io/github/license/rakannimer/get-firebase-ref.svg
[bundlephobia-badge]: https://img.shields.io/bundlephobia/minzip/get-firebase-ref.svg
[bundlephobia-href]: https://bundlephobia.com/result?p=get-firebase-ref