Solves a problem with util.format
npm install quick-format-unescapedSometimes you want to embed the results of quick-format into another string,
and then escape the whole string.
``js`
var format = require('quick-format-unescaped')
format('hello %s %j %d', ['world', [{obj: true}, 4, {another: 'obj'}]])
A printf-like format string. Example: 'hello %s %j %d'
Array of values to be inserted into the format string. Example: ['world', {obj:true}]
Passing an options object as the third parameter with a stringify will mean tryStringify
any objects will be passed to the supplied function instead of an the
internal function. This can be useful when using augmentedfast-safe-stringify
capability serializers such as or fast-redact.
By default quick-format-unescaped uses JSON.stringify instead of util.inspect, this means functions will not be serialized.
``
util*100000: 350.325ms
quick*100000: 268.141ms
utilWithTailObj*100000: 586.387ms
quickWithTailObj*100000: 280.200ms
util*100000: 325.735ms
quick*100000: 270.251ms
utilWithTailObj*100000: 492.270ms
quickWithTailObj*100000: 261.797ms
```
util*100000: 301.035ms
quick*100000: 217.005ms
utilWithTailObj*100000: 404.778ms
quickWithTailObj*100000: 236.176ms
util*100000: 286.349ms
quick*100000: 214.646ms
utilWithTailObj*100000: 388.574ms
quickWithTailObj*100000: 226.036ms
Sponsored by nearForm