This package has been deprecated

Author message:

Deprecated in favor of package 1log

pipable-log
TypeScript icon, indicating that this package has built-in type declarations

3.1.0 • Public • Published

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

Readme

Keywords

none

Package Sidebar

Install

npm i pipable-log

Weekly Downloads

6

Version

3.1.0

License

MIT

Unpacked Size

164 kB

Total Files

120

Last publish

Collaborators

  • ivan7237d