index.js
function invokeAtDistance(value, asTPV) {
  var after = asTPV ? asTemplateValue : identity;
  if ('text' in value) {
    return Promise.resolve(value.text).then(String).then(after);
  } else if ('any' in value) {
    return Promise.resolve(value.any).then(after);
  } else if ('html' in value) {
    return Promise.resolve(value.html).then(asHTML).then(after);
  } else {
    return Promise.resolve(invokeTransformer(value)).then(after);
  }
}
function invokeAtDistance(value, asTPV) {
  var after = asTPV ? asTemplateValue : identity;
  if ('text' in value) {
    return Promise.resolve(value.text).then(String).then(after);
  } else if ('any' in value) {
    return Promise.resolve(value.any).then(after);
  } else if ('html' in value) {
    return Promise.resolve(value.html).then(asHTML).then(after);
  } else {
    return Promise.resolve(invokeTransformer(value)).then(after);
  }
}
function invokeAtDistance ( value , asTPV ) { var after = asTPV ? asTemplateValue : identity ; if ( 'text' in value ) { return Promise . resolve ( value . text ) . then ( String ) . then ( after ) ; } else if ( 'any' in value ) { return Promise . resolve ( value . any ) . then ( after ) ; } else if ( 'html' in value ) { return Promise . resolve ( value . html ) . then ( asHTML ) . then ( after ) ; } else { return Promise . resolve ( invokeTransformer ( value ) ) . then ( after ) ; } }
use a placeholder and resolve with the right callback
use a placeholder and resolve with the right callback