custom-util-format
A customizable version of the util.format()
function from the node.js stdlib.
Create a customized format()
function by passing an object of custom flags. Each key should be a single character flag, and each value a function that formats the argument for that flag. These flags will be merged with the default s
, d
, and j
flags. Pass any falsey value to override them.
usage
const format = `%` console;// => 'msg: 50% complete'