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'
|
util.format('%s:%s', 'foo'); // 'foo:%s'
|
||||||
|
|
||||||
If there are more arguments than placeholders, the extra arguments are
|
If there are more arguments than placeholders, the extra arguments are
|
||||||
converted to strings with `util.inspect()` and these strings are concatenated,
|
coerced to strings (for objects and symbols, `util.inspect()` is used)
|
||||||
delimited by a space.
|
and then concatenated, delimited by a space.
|
||||||
|
|
||||||
util.format('%s:%s', 'foo', 'bar', 'baz'); // 'foo:bar baz'
|
util.format('%s:%s', 'foo', 'bar', 'baz'); // 'foo:bar baz'
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue