withMeta = (method, path, value, onComplete) => {
    if (isObject(value)) {
      const prefix = method === 'update' ? 'updated' : 'created'
      const dataWithMeta = {
        ...value,
        [`${prefix}At`]: firebase.database.ServerValue.TIMESTAMP
      }
      if (firebase.auth().currentUser) {
        dataWithMeta[`${prefix}By`] = firebase.auth().currentUser.uid
      }
      return firebase.database().ref(path)[method](dataWithMeta, onComplete)
    }
    return firebase.database().ref(path)[method](value, onComplete)
  }
@private
@param {string} method - Method to run with meta attached
@param {string} path - Path to location on Firebase which to set
@param {object|string|boolean|number} value - Value to write to Firebase
@param {Function} onComplete - Function to run on complete
@returns {Promise} Containing reference snapshot