1.0.8 • Published 5 years ago

instant-firestore v1.0.8

Weekly downloads
1
License
MIT
Repository
github
Last release
5 years ago

Instant Firestore

Firebase Firestore ORM to ease common tasks, such as creating, finding, updating and deleting documents.

Please note: This is an unofficial Firestore package, designed to assist with common Firestore tasks.

Table of Contents

Installation

You can install this package using npm:

$ npm install instant-firestore

Usage

Here is a quick example to get you started:

ES Modules

import { FirestoreRepository } from 'instant-firestore';

// Pass your firestore instance and a collection reference to the constructor
const fr = new FirestoreRepository(db, db.collection('your-collection-name'));

const data await = fr.findById('12345');
console.log(data);

CommonJS Modules

var FirestoreRepository = require('instant-firestore').FirestoreRepository;

// Pass your firestore instance and a collection reference to the constructor
var fr = new FirestoreRepository(db, db.collection('your-collection-name'));

fr.findById('12345').then(function(data) {
  console.log(data);
});

API

create

Create a Firestore document.

Arguments

attributes (Object): The document attributes.\ options (Object): Options.

Returns

(Object): The serialized document

createMany

find

findOne

findById

createWithId

update

delete

updateOrCreate

Contributing

We'd greatly appreciate any contribution you make.

License

MIT

1.0.8

5 years ago

1.0.7

5 years ago

1.0.6

5 years ago

1.0.5

5 years ago

1.0.4

5 years ago

1.0.3

5 years ago

1.0.2

5 years ago

1.0.1

5 years ago

1.0.0

5 years ago

0.2.0

5 years ago

0.1.10

5 years ago

0.1.9

5 years ago

0.1.8

6 years ago

0.1.7

6 years ago

0.1.6

6 years ago

0.1.5

6 years ago

0.1.4

6 years ago

0.1.3

6 years ago

0.1.2

6 years ago

0.1.1

6 years ago

0.1.0

6 years ago

0.0.2

6 years ago

0.0.1

6 years ago