Deprecated predecessor of console.error.
The util.debuglog() method is used to create a function that conditionally writes debug messages to stderr based on the existence of the NODE_DEBUG environment variable. If the section name appears within the value of that environment variable, then the returned function operates similar to console.error(). If not, then the returned function is a no-op.
The util.deprecate() method wraps the given function or class in such a way that it is marked as deprecated.
Deprecated predecessor of console.error.
The util.format() method returns a formatted string using the first argument as a printf-like format.
Inherit the prototype methods from one constructor into another. The prototype of constructor will be set to a new object created from superConstructor.
Internal alias for Array.isArray.
Returns true if the given object is a Boolean. Otherwise, returns false.
Returns true if the given object is a Buffer. Otherwise, returns false.
Returns true if the given object is a Date. Otherwise, returns false.
Returns true if the given object is an Error. Otherwise, returns false.
Returns true if the given object is a Function. Otherwise, returns false.
Returns true if the given object is strictly null. Otherwise, returns false.
Returns true if the given object is null or undefined. Otherwise, returns false.
Returns true if the given object is a Number. Otherwise, returns false.
Returns true if the given object is strictly an Object and not a Function. Otherwise, returns false.
Returns true if the given object is a primitive type. Otherwise, returns false.
Returns true if the given object is a RegExp. Otherwise, returns false.
Returns true if the given object is a String. Otherwise, returns false.
Returns true if the given object is a Symbol. Otherwise, returns false.
Returns true if the given object is undefined. Otherwise, returns false.
The util.log() method prints the given string to stdout with an included timestamp.
Deprecated predecessor of console.log.
Deprecated predecessor of console.log.
Generated using TypeDoc
The
util._extend()method was never intended to be used outside of internal Node.js modules. The community found and used it anyway.It is deprecated and should not be used in new code. JavaScript comes with very similar built-in functionality through
Object.assign().