3.1.0 • Published 3 years ago

pipable-log v3.1.0

Weekly downloads
11
License
MIT
Repository
github
Last release
3 years ago

pipable-log

npm version gzip size gzip size

Pipable, plugable log function.

Installing

yarn add pipable-log

or

npm install pipable-log --save

log

The library provides a function log which takes any number of plugins as arguments and returns a function that you can use to wrap a value without changing the behavior of your program, so log(plugin1, plugin2, ...)(value) would be equivalent to just value. This shape of the logger has two advantages:

  • It is convenient to work with a single multi-purpose logger function that you can re-define, for example by putting const log = <a logger that is conditionally disabled or prefixes all messages with a badge> at the start of a module.

  • log(...) can be inserted into a pipe such as one built with the pipeline operator ponyfill from Antiutils library or one built with the pipe method of an RxJS observable.


Contributing guidelines

3.1.0

3 years ago

3.0.2

3 years ago

3.0.1

3 years ago

3.0.0

3 years ago

2.1.0

3 years ago

2.0.0

3 years ago

1.0.1

3 years ago

1.0.0

3 years ago