mirror of https://github.com/nodejs/node.git
doc: fix format docs discrepancy
Only objects and symbols use `util.inspect`, others are simply concatenated. Fixes: https://github.com/iojs/io.js/issues/935 PR-URL: https://github.com/iojs/io.js/pull/1255 Reviewed-By: Colin Ihrig <cjihrig@gmail.com>pull/1241/merge
parent
8a945814dd
commit
45814216ee
|
@ -63,8 +63,8 @@ not replaced.
|
|||
util.format('%s:%s', 'foo'); // 'foo:%s'
|
||||
|
||||
If there are more arguments than placeholders, the extra arguments are
|
||||
converted to strings with `util.inspect()` and these strings are concatenated,
|
||||
delimited by a space.
|
||||
coerced to strings (for objects and symbols, `util.inspect()` is used)
|
||||
and then concatenated, delimited by a space.
|
||||
|
||||
util.format('%s:%s', 'foo', 'bar', 'baz'); // 'foo:bar baz'
|
||||
|
||||
|
|
Loading…
Reference in New Issue