Skip to content

Commit

Permalink
doc: fix format docs discrepancy
Browse files Browse the repository at this point in the history
Only objects and symbols use `util.inspect`, others are simply
concatenated.

Fixes: #935
PR-URL: #1255
Reviewed-By: Colin Ihrig <[email protected]>
  • Loading branch information
brendanashworth committed Mar 25, 2015
1 parent 8a94581 commit 4581421
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions doc/api/util.markdown
Original file line number Diff line number Diff line change
Expand Up @@ -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'

Expand Down

0 comments on commit 4581421

Please sign in to comment.