pinojs / quick-format-unescaped

Solves a problem with util.format
MIT License
17 stars 13 forks source link

Unescaped version still escape arguments #13

Closed yaroslav-korotaev closed 6 years ago

yaroslav-korotaev commented 6 years ago

I've used pino logger and found that interpolated messages get escaped. So, it happens here.

const util = require('util');
const format = require('quick-format-unescaped');

console.log(util.format('test: %s', 'with \"qoutes\"')); // -> test: with "qoutes"
console.log(format(['test: %s', 'with \"qoutes\"'])); // -> test: with \"qoutes\"