exothermic

Firebase.js mock with javascript object input

Usage no npm install needed!

<script type="module">
  import exothermic from 'https://cdn.skypack.dev/exothermic';
</script>

README

Exothermic

A small library to create firebase server for local development and testing.

$ npm install exothermic

old

import Firebase from 'firebase'

const FIREBASE_URL = '...'
let firebase = new Firebase(FIREBASE_URL)

new

import exothermic from 'exothermic'

const initialdata = {
  ...
}
let firebase = exothermic(initialdata)

TODO

Not yet the whole API is mocked, because I think there are some parts that I don't need. All the other parts are mocked and should be working: let me know if there is a bug!

Reference (Methods)

  • child()
  • parent()
  • root()
  • key()
  • set()
  • update()
  • remove()
  • push()
  • setWithPriority() Really, screw priority
  • ~~setPriority() Really, screw priority
  • transaction()

Query (Methods)

  • on()
  • off()
  • once()
  • orderByChild()
  • orderByKey()
  • orderByValue()
  • orderByPriority() Really, screw priority
  • startAt()
  • endAt()
  • equalTo()
  • limitToFirst()
  • limitToLast()
  • ref()

Firebase.onDisconnect() (Methods)

  • set()
  • update()
  • remove()
  • setWithPriority()
  • cancel() Don't think this is necessary

Firebase.ServerValue (Constants)

  • TIMESTAMP

DataSnapshot (Methods)

  • exists()
  • val()
  • child()
  • forEach()
  • hasChild()
  • hasChildren()
  • key()
  • name()
  • numChildren()
  • ref()
  • getPriority() Not sure if I am gonna implement this
  • exportVal()