3 ms·
JavaScript much to my dismay has no sprintf. It's one of the most annoying omissions ever for server side work.
by baudehlo 11y ago
JavaScript much to my dismay has no sprintf. It's one of the most annoying omissions ever for server side work.
- mayank 11y agorequire('util').format gets you pretty close.
- baudehlo 11y agoNo it really doesn't. It is so far away from even Perl's printf (considered ancient by most JS programmers) that it is not even funny.
- galistoca 11y agoes6 has one
- baudehlo 11y agoNo it doesn't. It comes with template strings. Any sprintf type functionality requires you to call functions on the input. It is a tiny tiny step forward.
- deleted 11y ago[deleted]
- lukeschlather 11y agoThe biggest thing I've run into is that there's no built-in `mkdir -p`. There is, of course, a module that is literally just mkdirp.