Skip to content
This repository has been archived by the owner on Apr 22, 2023. It is now read-only.

Commit

Permalink
Browse files Browse the repository at this point in the history
doc: util: add args to format and methods error, puts, print
  • Loading branch information
shama authored and bnoordhuis committed Apr 24, 2012
1 parent 48cdbff commit d9bad09
Showing 1 changed file with 15 additions and 1 deletion.
16 changes: 15 additions & 1 deletion doc/api/util.markdown
Expand Up @@ -6,7 +6,7 @@ These functions are in the module `'util'`. Use `require('util')` to access
them.


## util.format()
## util.format(format, [...])

Returns a formatted string using the first argument as a `printf`-like format.

Expand Down Expand Up @@ -44,6 +44,20 @@ output `string` immediately to `stderr`.

require('util').debug('message on stderr');

## util.error([...])

Same as `util.debug()` except this will output all arguments immediately to
`stderr`.

## util.puts([...])

A synchronous output function. Will block the process and output all arguments
to `stdout` with newlines after each argument.

## util.print([...])

A synchronous output function. Will block the process, cast each argument to a
string then output to `stdout`. Does not place newlines after each argument.

## util.log(string)

Expand Down

0 comments on commit d9bad09

Please sign in to comment.