Skip to content

Instantly share code, notes, and snippets.

Avatar

Adrian Mercado alvirtuoso

View GitHub Profile
@alvirtuoso
alvirtuoso / bulkUpdate.js
Created Jul 19, 2016 — forked from davideast/bulkUpdate.js
Bulk update with .push()
View bulkUpdate.js
/**
* Send a bulk update to Firebase from an array or an object literal.
*
* When .push() is called on a Firebase reference without a parameter passed no
* trip to the server is made.
*
* ex:
* var childRef = ref.push();
*
* A reference is returned which has a push-id that can be returned by calling .name().