Helpful Scripts utility functions for use in both browser and node
environments
npm i hsutil
Pacing
functions that- paces a series of function calls to not occur faster than a preset rate not issue more unresolved calls then a preset limit.
- provide delays and timeouts for promises.
CheckSum
a quick checksum implementation for small stringsDate
printf-style date formatting functionuniquefy
removes duplicates from arrays, as defined by a selectable keylog
console.log - style logging utility supporting- module-level logging and configuration of module IDs and time stamp format
log.inform('passed'); // -> 20200516 11:21:54 myModule INFO passed
- global and module-level filtering of the severity of log outputs: debug, inform, warn, error
- optional functional call type to avoid compiling messages that will be filtered
log,inform(()=>
passed);
- colored log messages, by severity
- colored inspect output, by indentation level
- configurable message-middle truncating to limit maximum message length
- module-level logging and configuration of module IDs and time stamp format
See docs for details