ai-log
v1.1.0
Published
Tap into an async iterable pipeline and log all chunks passing through
Downloads
5
Maintainers
Readme
ai-log
Tap into an async iterable pipeline and log all chunks passing through
This module is part of Async iterable fun, a complete toolset of modules to work with async iterables.
Usage
description of the example
import log from "ai-log";
import map from "ai-map";
import compose from "compose-function";
const double = map.with(n => n * 2);
const add2 = map.with(n => n + 2);
const calculate = compose(
log("add2 result"),
add2,
log("double result"),
double
);
calculate([1, 2, 3]);
This will output
[double result] 2
[add2 result] 4
[double result] 4
[add2 result] 6
[double result] 6
[add2 result] 8
API
Install
With npm installed, run
npm install --save ai-log
See Also
parro-it/ai-fun
- A collection of modules to easy deal with async iterables.noffle/common-readme
- « a common readme for node ».
License
MIT Licensed © 2017 Andrea Parodi