# @kayac/run-with-log

> wrap function with custom log message function

Latest version **1.0.1** (published 2022-07-22) · MIT license · 0 weekly downloads

## Install

```sh
npm install @kayac/run-with-log
pnpm add @kayac/run-with-log
yarn add @kayac/run-with-log
bun add @kayac/run-with-log
```

## Health

**Score 30/100 (F)** — status: abandoned.

Positive: has types; esm support; no vulnerabilities; high quality score.

Warnings: low downloads.

Negative: abandoned; low maintenance score.

## Facts

| | |
|---|---|
| Version | 1.0.1 |
| Published | 2022-07-22 |
| First published | 2022-07-22 |
| Weekly downloads | 0 |
| License | MIT |
| TypeScript types | bundled |
| Module format | ESM |
| Dependencies | 0 |
| Unpacked size | 2.7 KB |
| Known vulnerabilities | 0 |
| Install scripts | no |
| Author | kayac-chang |
| Maintainers | kayac |
| Keywords | log, trace, check, checking, validate, validation, utility, util, typescript |

## Links

- npm: https://www.npmjs.com/package/@kayac/run-with-log
- Repository: https://github.com/kayac-chang/run-with-log
- npm.io page: https://npm.io/package/@kayac/run-with-log

## Alternatives

- [cli-color](https://npm.io/package/cli-color.md) — 3.4M weekly downloads
- [log](https://npm.io/package/log.md) — 1.3M weekly downloads
- [logstash-client](https://npm.io/package/logstash-client.md) — 4.5K weekly downloads
- [@nocobase/plugin-logger](https://npm.io/package/@nocobase/plugin-logger.md) — 2.0K weekly downloads
- [child-process-debug](https://npm.io/package/child-process-debug.md) — 695 weekly downloads

## Recent versions

- 1.0.1 (latest) — 2022-07-22

## README

# Run With Log

wrap function with custom log message function.

## Install

```
npm install @kaya/run-with-log
```

## Usage

```js
import runWithLog from "@kaya/run-with-log";

const add = (a, b) => a + b;

const addWithLog = runWithLog(
  ([x, y], result) => `${x} + ${y} = ${result}`,
  add
);

const result = addWithLog(1, 1); //=> print "1 + 1 = 2"
// result === 2
```

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