Skip to content

v0.1.6

Compare
Choose a tag to compare
@maraisr maraisr released this 01 Jun 07:44
· 72 commits to main since this release
ee0f1d1

Features

  • New compare util to help with log level comparing.
import { compare } from 'diary/utils';

// when `a` is _less-than_ `b` then -1
compare('warn', 'error');

// when `a` is _more-than_ `b` then 1
compare('fatal', 'error');

// when `a` is the _same_  as`b` then 0
compare('fatal', 'fatal');