function orderedFromSnapshot(snap) {
  if (snap.hasChildren && !snap.hasChildren()) {
    return null
  }
  const ordered = []
  if (snap.forEach) {
    snap.forEach((child) => {
      ordered.push({ key: child.key, value: child.val() })
    })
  }
  return ordered.length ? ordered : null
}
Get ordered array from snapshot
@param {firebase.database.DataSnapshot} snap - Data for which to create
an ordered array.
@returns {Array|null} Ordered list of children from snapshot or null