# instant-firestore-utils

> Lightweight Firebase Firestore utility library.

Latest version **1.0.3** (published 2018-12-18) · MIT license · 0 weekly downloads

## Install

```sh
npm install instant-firestore-utils
pnpm add instant-firestore-utils
yarn add instant-firestore-utils
bun add instant-firestore-utils
```

## Health

**Score 15/100 (F)** — status: abandoned.

Positive: no vulnerabilities.

Warnings: low downloads; no types; no esm support.

Negative: abandoned; low maintenance score.

## Facts

| | |
|---|---|
| Version | 1.0.3 |
| Published | 2018-12-18 |
| First published | 2018-08-29 |
| Weekly downloads | 0 |
| License | MIT |
| TypeScript types | none |
| Module format | CommonJS |
| Dependencies | 1 |
| Unpacked size | 33.4 KB |
| Known vulnerabilities | 0 |
| Install scripts | no |
| GitHub stars | 1 |
| Author | Craig Myles |
| Maintainers | cjmyles |
| Keywords | firestore |

## Links

- npm: https://www.npmjs.com/package/instant-firestore-utils
- Repository: https://github.com/cjmyles/instant-firestore-utils
- Homepage: https://github.com/cjmyles/instant-firestore-utils#readme
- Issues: https://github.com/cjmyles/instant-firestore-utils/issues
- npm.io page: https://npm.io/package/instant-firestore-utils

## Dependencies (1)

- [instant-utils](https://npm.io/package/instant-utils.md) 0.0.1

## Recent versions

- 1.0.3 (latest) — 2018-12-18
- 1.0.2 — 2018-12-17
- 1.0.1 — 2018-12-17
- 1.0.0 — 2018-12-14
- 0.0.6 — 2018-09-08
- 0.0.5 — 2018-09-08
- 0.0.4 — 2018-09-08
- 0.0.3 — 2018-09-05
- 0.0.2 — 2018-08-31
- 0.0.1 — 2018-08-29

## README

# Instant Firestore Utils

Lightweight Firebase Firestore utility library.

_**Please note:** Although this package can be utilized with raw Firestore Documents and Collections, it may be easier to use the [`instant-firestore`](https://github.com/cjmyles/instant-firestore) ORM depending on your requirements._

## Table of Contents

- [Installation](#installation)
- [Usage](#usage)
- [API](#api)
  - [getDocument](#getdocument)
  - [getCollection](#getcollection)
  - [getSubCollection](#getsubcollection)
  - [serializeDocument](#serializedocument)
  - [serializeSnapshot](#serializesnapshot)
  - [populate](#populate)
  - [populateReference](#populatereference)
  - [populatePath](#populatepath)
  - [populateSubcollection](#populatesubcollection)
  - [deserialize](#deserialize)
  - [deserializePath](#deserializepath)
- [Contributing](#contributing)
- [License](#license)

## Installation

You can install this package using npm:

```bash
$ npm install instant-firestore-utils
```

## Usage

Here is a quick example to get you started:

**ES Modules**

```javascript
import { getDocument } from 'instant-firestore-utils';

const test = async () => {
  const doc = await getDocument(db.collection('countries')); // Assumes db is a Firebase Firestore reference
  console.log(doc);
};
```

**CommonJS Modules**

```javascript
var getDocument = require('instant-firestore-utils').getDocument;

getDocument(db.collection('countries')).then(function(doc) {
  console.log(doc);
});
```

## API

### getDocument

### getCollection

### getSubCollection

### serializeDocument

### serializeSnapshot

### populate

### populateReference

### populatePath

### populateSubcollection

### deserialize

### deserializePath

## Contributing

We'd greatly appreciate any [contribution](CONTRIBUTING.md) you make.

## License

[MIT](LICENSE)

---
_Source: https://npm.io/package/instant-firestore-utils · Machine-readable twin of the npm.io package page. Health data is recomputed on every publish._
