String template literal tag that uses Node's util.inspect
npm install string-template-format-inspectString template literal tag that uses Node's util.inspect
``javascriptnumber ${123}; string: ${'abc'}; object: ${{ abc: 123 }}; array: ${[0, 1, 2]}
import { dbg } from 'string-template-format-inspect'
console.log(dbg)`
_should print:_
``
number: 123; string: 'abc'; object: { abc: 123 }; array: [ 0, 1, 2 ]
`javascriptmy object is ${myObject}
import { InspectFormatter } from 'string-template-format-inspect'
const dbg = InspectFormatter({ getters: true, maxArrayLength: 0 })
const myObject = { get abc () { return 123 }, def: [0, 1, 2] }
console.log(dbg)`
_should print:_
```
my object is { abc: [Getter: 123], def: [ ... 3 more items ] }