Skip to content

0.10.0

Compare
Choose a tag to compare
@dsherret dsherret released this 25 Aug 16:18
· 191 commits to main since this release

$.logIndent(...) is deprecated and replaced with a new $.logGroup that works similarly to console.group and console.groupEnd. You can still provide just a function though as it handles de-indenting for you when errors are thrown.

// log indented within (handles de-indenting when an error is thrown)
await $.logGroup(async () => {
  $.log("This will be indented.");
  await $.logGroup(async () => {
    $.log("This will indented even more.");
    // do maybe async stuff here
  });
});

// or use $.logGroup with $.logGroupEnd
$.logGroup();
$.log("Indented 1");
$.logGroup("Level 2");
$.log("Indented 2");
$.logGroupEnd();
$.logGroupEnd();