index.js
function onChildAdd(newData) {

    // ignore all events before first read
    if (!started) return;

    // ignore already added item
    if (data[newData.key()]) return;

    // ignore older items that are not loaded
    if ( !ended
      && !data[newData.key()]
      && marker && newData.compareTo(marker) > 0) return;

    return add(newData).then(emitValue);
  }
function onChildAdd(newData) {

    // ignore all events before first read
    if (!started) return;

    // ignore already added item
    if (data[newData.key()]) return;

    // ignore older items that are not loaded
    if ( !ended
      && !data[newData.key()]
      && marker && newData.compareTo(marker) > 0) return;

    return add(newData).then(emitValue);
  }
add child to data buffer, and emit value

@return {Promise}