# @blackglory/log

> ```sh npm install --save @blackglory/log # or yarn add @blackglory/log ```

Latest version **2.1.0** (published 2026-02-12) · MIT license · 0 weekly downloads

## Install

```sh
npm install @blackglory/log
pnpm add @blackglory/log
yarn add @blackglory/log
bun add @blackglory/log
```

## Health

**Score 60/100 (C)** — status: stable.

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

Warnings: low downloads.

## Facts

| | |
|---|---|
| Version | 2.1.0 |
| Published | 2026-02-12 |
| First published | 2021-12-28 |
| Weekly downloads | 0 |
| License | MIT |
| TypeScript types | bundled |
| Module format | ESM + CommonJS |
| Node | >=16 |
| Dependencies | 5 |
| Unpacked size | 15.2 KB |
| Known vulnerabilities | 0 |
| Install scripts | no |
| GitHub stars | 0 |
| Author | BlackGlory |
| Maintainers | black_glory |

## Links

- npm: https://www.npmjs.com/package/@blackglory/log
- Repository: https://github.com/BlackGlory/log
- Homepage: https://github.com/BlackGlory/log#readme
- Issues: https://github.com/BlackGlory/log/issues
- npm.io page: https://npm.io/package/@blackglory/log

## Dependencies (5)

- [justypes](https://npm.io/package/justypes.md) ^4.4.1
- [extra-utils](https://npm.io/package/extra-utils.md) ^5.20.0
- [extra-promise](https://npm.io/package/extra-promise.md) ^6.0.4
- [@blackglory/go](https://npm.io/package/@blackglory/go.md) ^1.1.2
- [extra-compatible](https://npm.io/package/extra-compatible.md) ^0.2.0

## Recent versions

- 2.1.0 (latest) — 2026-02-12
- 2.0.2 — 2023-06-11
- 2.0.1 — 2023-03-18
- 1.3.5 — 2023-01-28
- 2.0.0 — 2023-01-27
- 1.3.4 — 2023-01-27
- 1.3.3 — 2022-11-01
- 1.3.2 — 2022-11-01
- 1.3.1 — 2022-10-31
- 1.3.0 — 2022-10-11
- 1.2.0 — 2022-04-19
- 1.1.1 — 2022-04-18
- 1.1.0 — 2022-04-18
- 1.0.0 — 2022-03-05
- 0.1.1 — 2022-02-28
- … 1 more at https://npm.io/package/@blackglory/log/versions

## README

# log
## Install
```sh
npm install --save @blackglory/log
# or
yarn add @blackglory/log
```

## Usage
```ts
import { log } from '@blackglory/log'

const value = log('foo', 'bar')
// Equivalent to
const value = (console.log('foo', 'bar'), 'bar')
```

## API
### log
```ts
function log<T>(...params: [...unknown[], T]): T
```

### time
```ts
function time<T>(message: string, fn: () => T): T
function time<T>(message: string, fn: () => PromiseLike<T>): Promise<T>
```

### timeFunction
```ts
function timeFunction<Result, Args extends any[]>(
  message: string
, fn: (...args: Args) => Result
): (...args: Args) => Result
```

### timeAsyncFunction
```ts
function timeAsyncFunction<Result, Args extends any[]>(
  message: string
, fn: (...args: Args) => PromiseLike<Result>
): (...args: Args) => Promise<Result>
```

### group
```ts
export function group<T>(label: string, fn: () => T): T
export function group<T>(label: string, fn: () => PromiseLike<T>): Promise<T>
export function group<T>(fn: () => T): T
export function group<T>(fn: () => PromiseLike<T>): Promise<T>
```

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