JSPM

ai-log

1.1.0
  • ESM via JSPM
  • ES Module Entrypoint
  • Export Map
  • Keywords
  • License
  • Repository URL
  • TypeScript Types
  • README
  • Created
  • Published
  • Downloads 5
  • Score
    100M100P100Q21892F
  • License MIT

Tap into an async iterable pipeline and log all chunks passing through

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

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