index.js
function promise (input, value) {
  value.then(val => {
    morph(val, input)
  }, reason => {
    input.emit('error', reason)
  })
}
function promise (input, value) {
  value.then(val => {
    morph(val, input)
  }, reason => {
    input.emit('error', reason)
  })
}
function promise ( input , value ) { value . then ( val => { morph ( val , input ) } , reason => { input . emit ( 'error' , reason ) } ) }
End input stream with given promise.

@param {Stream} input
@param {Promise} value
@api private
End input stream with given promise .