Skip to content

Latest commit

 

History

History
17 lines (14 loc) · 357 Bytes

README.md

File metadata and controls

17 lines (14 loc) · 357 Bytes

firebase-helpers

a list of small tools for managing a firebase backend

batch_bulk.ts:

const snap = await collection("mycollection").get();
const docs = snap.docs
const batch = new BatchBulk()
for(const doc of docs){
  const newData = {}
  batch.set(doc.ref, newData)
  batch.update(doc.ref, newData)
  // etc...
}

await batch.commit()```