stayradiated / slog

Repeatedly log to the console while waiting for an async task

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Slog

Track how long an async task is taking

Installation

npm install @stayradiated/slog

Usage

import slog from '@stayradiated/slog'
import execa from 'execa'

await slog(
  'Installing dependencies',
  execa('npm', ['install'])
)

/*
Installing dependencies (0:00)
Installing dependencies (0:01)
Installing dependencies (0:02)
Installing dependencies (0:03) ✓
*/

About

Repeatedly log to the console while waiting for an async task


Languages

Language:TypeScript 100.0%