Ninju / reduce-stream-to-promise

Reduce a stream to a promise by the given reduction function

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

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))

About

Reduce a stream to a promise by the given reduction function

License:MIT License


Languages

Language:JavaScript 100.0%