Package Exports
- ai-log
This package does not declare an exports field, so the exports above have been automatically detected and optimized by JSPM instead. If any package subpath is missing, it is recommended to post an issue to the original package (ai-log) to support the "exports" field. If that is not possible, create a JSPM override to customize the exports field for this package.
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] 8API
Install
With npm installed, run
npm install --save ai-logSee 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