Skip to content

Instantly share code, notes, and snippets.

View gigocabrera's full-sized avatar

Luis Cabrera gigocabrera

View GitHub Profile
@gigocabrera
gigocabrera / firebase_copy.js
Created August 5, 2016 20:57 — forked from katowulf/firebase_copy.js
Move or copy a Firebase path to a new location
function copyFbRecord(oldRef, newRef) {
oldRef.once('value', function(snap) {
newRef.set( snap.value(), function(error) {
if( error && typeof(console) !== 'undefined' && console.error ) { console.error(error); }
});
});
}