# pipable-log

> Pipable, plugable log function

Latest version **3.1.0** (published 2020-12-20) · MIT license · 0 weekly downloads

> **Deprecated.** This package is deprecated.

## Install

```sh
npm install pipable-log
pnpm add pipable-log
yarn add pipable-log
bun add pipable-log
```

## Health

**Score 10/100 (F)** — status: deprecated.

Negative: deprecated.

## Facts

| | |
|---|---|
| Version | 3.1.0 |
| Published | 2020-12-20 |
| First published | 2020-12-04 |
| Weekly downloads | 0 |
| License | MIT |
| TypeScript types | bundled |
| Module format | ESM + CommonJS |
| Node | >=10 |
| Dependencies | 1 |
| Unpacked size | 160.2 KB |
| Known vulnerabilities | 0 |
| Install scripts | no |
| Maintainers | ivan7237d |

## Links

- npm: https://www.npmjs.com/package/pipable-log
- Repository: https://github.com/ivan7237d/pipable-log
- Homepage: https://ivan7237d.github.io/pipable-log/
- Issues: https://github.com/ivan7237d/pipable-log/issues
- npm.io page: https://npm.io/package/pipable-log

## Dependencies (1)

- [antiutils](https://npm.io/package/antiutils.md) 2.x

## Recent versions

- 3.1.0 (latest) — 2020-12-20
- 3.0.2 — 2020-12-13
- 3.0.1 — 2020-12-13
- 3.0.0 — 2020-12-13
- 2.1.0 — 2020-12-12
- 2.0.0 — 2020-12-11
- 1.0.1 — 2020-12-04
- 1.0.0 — 2020-12-04

## README

# pipable-log

[![npm version](https://badge.fury.io/js/pipable-log.svg)](https://badge.fury.io/js/pipable-log)
[![gzip size](https://badgen.net/bundlephobia/minzip/pipable-log?color=green)](https://bundlephobia.com/result?p=pipable-log)
[![gzip size](https://badgen.net/bundlephobia/tree-shaking/pipable-log)](https://bundlephobia.com/result?p=pipable-log)

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](https://github.com/ivan7237d/antiutils) library or one built with the `pipe` method of an [RxJS](https://rxjs-dev.firebaseapp.com/guide/overview) observable.

---

[Contributing guidelines](https://github.com/ivan7237d/antiutils/blob/master/.github/CONTRIBUTING.md)

---
_Source: https://npm.io/package/pipable-log · Machine-readable twin of the npm.io package page. Health data is recomputed on every publish._
