0.6.0 • Published 5 years ago

@star__hoshi/torte v0.6.0

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

Torte is a Web Frontend Firestore Wrapper library that can be used just like starhoshi/tart.

Installation

npm install @star__hoshi/torte --save
yarn add @star__hoshi/torte

Usage

Initialize

import * as firebase from 'firebase'
import * as Torte from '@star__hoshi/torte'

const config = {
  apiKey: process.env.FIREBASE_API_KEY,
  authDomain: process.env.FIREBASE_AUTH_DOMAIN,
  databaseURL: process.env.FIREBASE_DATABASE_URL,
  projectId: process.env.FIREBASE_PROJECT_ID,
}
firebase.initializeApp(config)

const auth = firebase.auth()
const firestore = firebase.firestore()

// Torte expects timestampsInSnapshots to be 'true'
firestore.settings({ timestampsInSnapshots: true })

Torte.initialize(firestore)

Other Interfaces are just the same as tart.

0.6.0

5 years ago

0.5.0

5 years ago

0.4.0

6 years ago

0.3.1

6 years ago

0.3.0

6 years ago

0.2.0

6 years ago

0.1.1

6 years ago

0.1.0

6 years ago