index.js
function update() {
  for (var
    tmp,
    promise = false,
    updates = this.updates,
    template = this.chunks,
    out = [template[0]],
    i = 1,
    length = arguments.length;
    i < length; i++
  ) {
    tmp = arguments[i];
    if (
      (typeof tmp === 'object' && tmp !== null)
      &&
      (typeof tmp.then === 'function' || 'placeholder' in tmp)
    ) {
      promise = true;
      out.push(
        ('placeholder' in tmp ? invokeAtDistance(tmp, false) : tmp)
          .then(updates[i - 1]),
        template[i]
      );
    } else {
      out.push(updates[i - 1](tmp), template[i]);
    }
  }
  return promise ? Promise.all(out).then(asBuffer) : asBuffer(out);
}
function update() {
  for (var
    tmp,
    promise = false,
    updates = this.updates,
    template = this.chunks,
    out = [template[0]],
    i = 1,
    length = arguments.length;
    i < length; i++
  ) {
    tmp = arguments[i];
    if (
      (typeof tmp === 'object' && tmp !== null)
      &&
      (typeof tmp.then === 'function' || 'placeholder' in tmp)
    ) {
      promise = true;
      out.push(
        ('placeholder' in tmp ? invokeAtDistance(tmp, false) : tmp)
          .then(updates[i - 1]),
        template[i]
      );
    } else {
      out.push(updates[i - 1](tmp), template[i]);
    }
  }
  return promise ? Promise.all(out).then(asBuffer) : asBuffer(out);
}
function update ( ) { for ( var tmp , promise = false , updates = this . updates , template = this . chunks , out = [ template [ 0 ] ] , i = 1 , length = arguments . length ; i < length ; i ++ ) { tmp = arguments [ i ] ; if ( ( typeof tmp === 'object' && tmp !== null ) && ( typeof tmp . then === 'function' || 'placeholder' in tmp ) ) { promise = true ; out . push ( ( 'placeholder' in tmp ? invokeAtDistance ( tmp , false ) : tmp ) . then ( updates [ i - 1 ] ) , template [ i ] ) ; } else { out . push ( updates [ i - 1 ] ( tmp ) , template [ i ] ) ; } } return promise ? Promise . all ( out ) . then ( asBuffer ) : asBuffer ( out ) ; }
each known viperHTML update is kept as simple as possible. the context will be a viper
each known viperHTML update is kept as simple as possible . the context will be a viper