/reduce-stream-to-promise

Reduce a stream to a promise by the given reduction function

Primary LanguageJavaScriptMIT LicenseMIT

Reduce a stream to a promise

Usage

let reduceStream = require('reduce-stream-to-promise')

function concat(acc, curr) { 
  return acc + curr;
}

reduceStream(concat, '', stream).then(result => console.log(result))