diff --git a/doc/api/util.md b/doc/api/util.md index 7c6f572e15aefb..662c360359a307 100644 --- a/doc/api/util.md +++ b/doc/api/util.md @@ -19,6 +19,9 @@ are unnecessary for Node.js's internal functionality. Deprecated predecessor of `console.error`. ## util.debuglog(section) + * `section` {String} The section of the program to be debugged * Returns: {Function} The logging function @@ -52,6 +55,9 @@ You may separate multiple `NODE_DEBUG` environment variables with a comma. For example, `NODE_DEBUG=fs,net,tls`. ## util.deprecate(function, string) + Marks that a method should not be used any more. @@ -82,12 +88,19 @@ when the deprecated API is used. Configurable at run-time through the `process.throwDeprecation` takes precedence over `process.traceDeprecation`. ## util.error([...]) + > Stability: 0 - Deprecated: Use [`console.error()`][] instead. Deprecated predecessor of `console.error`. ## util.format(format[, ...]) + Returns a formatted string using the first argument as a `printf`-like format. @@ -125,6 +138,9 @@ util.format(1, 2, 3); // '1 2 3' ``` ## util.inherits(constructor, superConstructor) + Inherit the prototype methods from one [constructor][] into another. The prototype of `constructor` will be set to a new object created from @@ -159,6 +175,9 @@ stream.write('It works!'); // Received data: "It works!" ``` ## util.inspect(object[, options]) + Return a string representation of `object`, which is useful for debugging. @@ -249,6 +268,10 @@ util.inspect(obj); ``` ## util.isArray(object) + > Stability: 0 - Deprecated @@ -268,6 +291,10 @@ util.isArray({}) ``` ## util.isBoolean(object) + > Stability: 0 - Deprecated @@ -285,6 +312,10 @@ util.isBoolean(false) ``` ## util.isBuffer(object) + > Stability: 0 - Deprecated: Use [`Buffer.isBuffer()`][] instead. @@ -302,6 +333,10 @@ util.isBuffer(new Buffer('hello world')) ``` ## util.isDate(object) + > Stability: 0 - Deprecated @@ -319,6 +354,10 @@ util.isDate({}) ``` ## util.isError(object) + > Stability: 0 - Deprecated @@ -337,6 +376,10 @@ util.isError({ name: 'Error', message: 'an error occurred' }) ``` ## util.isFunction(object) + > Stability: 0 - Deprecated @@ -358,6 +401,10 @@ util.isFunction(Bar) ``` ## util.isNull(object) + > Stability: 0 - Deprecated @@ -376,6 +423,10 @@ util.isNull(null) ``` ## util.isNullOrUndefined(object) + > Stability: 0 - Deprecated @@ -394,6 +445,10 @@ util.isNullOrUndefined(null) ``` ## util.isNumber(object) + > Stability: 0 - Deprecated @@ -413,6 +468,10 @@ util.isNumber(NaN) ``` ## util.isObject(object) + > Stability: 0 - Deprecated @@ -433,6 +492,10 @@ util.isObject(function(){}) ``` ## util.isPrimitive(object) + > Stability: 0 - Deprecated @@ -463,6 +526,10 @@ util.isPrimitive(new Date()) ``` ## util.isRegExp(object) + > Stability: 0 - Deprecated @@ -480,6 +547,10 @@ util.isRegExp({}) ``` ## util.isString(object) + > Stability: 0 - Deprecated @@ -499,6 +570,10 @@ util.isString(5) ``` ### util.isSymbol(object) + > Stability: 0 - Deprecated @@ -516,6 +591,10 @@ util.isSymbol(Symbol('foo')) ``` ## util.isUndefined(object) + > Stability: 0 - Deprecated @@ -534,24 +613,40 @@ util.isUndefined(null) ``` ## util.log(string) + Output with timestamp on `stdout`. require('util').log('Timestamped message.'); ## util.print([...]) + > Stability: 0 - Deprecated: Use [`console.log()`][] instead. Deprecated predecessor of `console.log`. ## util.pump(readableStream, writableStream[, callback]) + > Stability: 0 - Deprecated: Use readableStream.pipe(writableStream) Deprecated predecessor of `stream.pipe()`. ## util.puts([...]) + > Stability: 0 - Deprecated: Use [`console.log()`][] instead.