Nice Paintings, Mondrian

    ai-log

    1.1.0 • Public • Published

    ai-log

    Travis Build Status NPM downloads

    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

    License

    MIT Licensed © 2017 Andrea Parodi

    Install

    npm i ai-log

    DownloadsWeekly Downloads

    1

    Version

    1.1.0

    License

    MIT

    Last publish

    Collaborators

    • parroit