String Template Format
String template tag that accepts any value and returns a string
Usage Examples
Embed objects into string as JSON
console.logformatJson`number ; string: ; object: ; array: `
should print:
number: 123; string: "abc"; object: {"abc":123}; array: [0,1,2]
util.inspect
Format objects with console.logformatInspect`number ; string: ; object: ; array: `
should print:
number: 123; string: 'abc'; object: { abc: 123 }; array: [ 0, 1, 2 ]
Custom tags
console.logmyTag`; ; ; `
should print:
[number 123]; [string abc]; [object [Object object]]; [array 0,1,2]