7 lines
192 B
JavaScript
7 lines
192 B
JavaScript
const Mhysa = require("mhysa");
|
|
|
|
Mhysa.fromArray(["a", "b", "cc"])
|
|
.pipe(Mhysa.reduce((acc, s) => ({ ...acc, [s]: s.length }), {}))
|
|
.pipe(Mhysa.stringify())
|
|
.pipe(process.stdout);
|