Fix reduce sample

This commit is contained in:
Sami Turcotte 2018-12-03 00:59:31 -05:00
parent 830d01f977
commit 407bb79260

View File

@ -2,4 +2,5 @@ const Mhysa = require("mhysa");
Mhysa.fromArray(["a", "b", "cc"]) Mhysa.fromArray(["a", "b", "cc"])
.pipe(Mhysa.reduce((acc, s) => ({ ...acc, [s]: s.length }), {})) .pipe(Mhysa.reduce((acc, s) => ({ ...acc, [s]: s.length }), {}))
.pipe(Mhysa.stringify())
.pipe(process.stdout); .pipe(process.stdout);