Util
Node.js util module — general-purpose utility functions. Includes string formatting, object inspection, promisification, and type checks.
Module:node:util
Support: Experimental
Since: 1.1.0
Docs: Node.js Docs
See also: https://nodejs.org/api/util.html
21 members: 19 supported, 2 undocumented
Static Methods
Properties
Writes a formatted timestamp + message to stdout (similar to console.log but with a timestamp).
Object with type-checking predicates (e.g. util.types.isDate, util.types.isMap). @compat elide Full
The WHATWG TextEncoder class. @compat elide Full
---
Details
inherits(constructor, superConstructor)
static inherits(constructor: object, superConstructor: object)
static inherits(constructor: object, superConstructor: object)
Sets up prototype inheritance between a constructor and a superclass.| Parameter | Type | Description |
|---|---|---|
constructor | object | The child constructor |
superConstructor | object | The parent constructor |