Skip to content

Repeatedly log to the console while waiting for an async task

Notifications You must be signed in to change notification settings

stayradiated/slog

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

8 Commits
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

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

Resources

Stars

Watchers

Forks

Packages

No packages published