@kayac/run-with-log
TypeScript icon, indicating that this package has built-in type declarations

1.0.1 • Public • Published

Run With Log

wrap function with custom log message function.

Install

npm install @kaya/run-with-log

Usage

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

Package Sidebar

Install

npm i @kayac/run-with-log

Weekly Downloads

1

Version

1.0.1

License

MIT

Unpacked Size

2.77 kB

Total Files

7

Last publish

Collaborators

  • kayac