sprintf.js
sprintf.js copied to clipboard
Configurable errors
It would be great to have possibility to switch off errors for empty placeholders in some cases
Especially in case of named placeholders, since, actually, they are the only one type of placeholders, which throw error:
Error: [sprintf] property 'val' does not exist
It's possible to make it configurable, just like I've described it in my comment here:
https://github.com/alexei/sprintf.js/issues/49#issuecomment-148887605
Or on sprontf() function invocation:
sprintf = require('sprintf-js').sprintf({
errorOnUndefined: false
})