index.js
function add(snapshot) {
    return Promise
      .resolve(mapFn(snapshot))
      .then(function(val) {
        data[snapshot.key()] = val;
      });
  }
function add(snapshot) {
    return Promise
      .resolve(mapFn(snapshot))
      .then(function(val) {
        data[snapshot.key()] = val;
      });
  }
add a snapshot to data

@param {DataSnapshot} snapshot
@return {Promise}