String template tag that accepts any value and returns a string
npm install string-template-formatString template tag that accepts any value and returns a string
``typescriptnumber ${123}; string: ${'abc'}; object: ${{ abc: 123 }}; array: ${[0, 1, 2]}
import { formatJson } from 'string-template-format'
console.log(formatJson)`
_should print:_
``
number: 123; string: "abc"; object: {"abc":123}; array: [0,1,2]
`typescriptnumber ${123}; string: ${'abc'}; object: ${{ abc: 123 }}; array: ${[0, 1, 2]}
import { formatInspect } from 'string-template-format'
console.log(formatInspect)`
_should print:_
``
number: 123; string: 'abc'; object: { abc: 123 }; array: [ 0, 1, 2 ]
`typescript[${typeof value} ${value}]
import { tag } from 'string-template-format'
const myTag = tag(value => )${123}; ${'abc'}; ${{ abc: 123 }}; ${[0, 1, 2]}
console.log(myTag)`
_should print:_
```
[number 123]; [string abc]; [object [Object object]]; [array 0,1,2]