view source
String Interpolation Using util.format() And util.inspect() In Node.js
In my blog post yesterday on creating custom error objects in Node.js, you may have seen me use the util.format() method to prepare some of the error data. The util.format() and util.inspect() methods are my two new favorite methods in Node.js. Together, they make string interpolation painless and powerful.
Advertisement