trait Util extends Object
These functions are in the module 'util'. Use require('util') to access them. The util module is primarily designed to support the needs of Node.js's internal APIs. Many of these utilities are useful for your own programs. If you find that these functions are lacking for your purposes, however, you are encouraged to write your own utilities. We are not interested in any future additions to the util module that are unnecessary for Node.js's internal functionality.
- Annotations
- @JSType() @native()
- See also
https://nodejs.org/api/util.html
- Alphabetic
- By Inheritance
- Util
- Object
- Any
- AnyRef
- Any
- Hide All
- Show All
- Public
- Protected
Value Members
- final def !=(arg0: Any): Boolean
- Definition Classes
- AnyRef → Any
- final def ##: Int
- Definition Classes
- AnyRef → Any
- final def ==(arg0: Any): Boolean
- Definition Classes
- AnyRef → Any
- final def asInstanceOf[T0]: T0
- Definition Classes
- Any
- def callbackify[T](original: Function): Function2[Any, T, Any]
- def clone(): AnyRef
- Attributes
- protected[lang]
- Definition Classes
- AnyRef
- Annotations
- @throws(classOf[java.lang.CloneNotSupportedException]) @native()
- def debuglog(section: String): Function
This is used to create a function which conditionally writes to stderr based on the existence of a NODE_DEBUG environment variable.
This is used to create a function which conditionally writes to stderr based on the existence of a NODE_DEBUG environment variable. If the section name appears in that environment variable, then the returned function will be similar to console.error(). If not, then the returned function is a no-op.
util.debuglog(section)
Example: - def deprecate(function: Function, message: String): Any
- def deprecate(function: Function, message: String, code: String): Any
Marks that a method should not be used any more.
Marks that a method should not be used any more.
util.deprecate(function, message)
Example: - final def eq(arg0: AnyRef): Boolean
- Definition Classes
- AnyRef
- def equals(arg0: AnyRef): Boolean
- Definition Classes
- AnyRef → Any
- def finalize(): Unit
- Attributes
- protected[lang]
- Definition Classes
- AnyRef
- Annotations
- @throws(classOf[java.lang.Throwable])
- def format(format: String, args: Any*): String
Returns a formatted string using the first argument as a printf-like format.
Returns a formatted string using the first argument as a printf-like format.
util.format(format[, ...])
Example: - def formatWithOptions(inspectOptions: InspectOptions, format: String, args: Any*): String
- final def getClass(): Class[_ <: AnyRef]
- Definition Classes
- AnyRef → Any
- Annotations
- @native()
- def getSystemErrorName(err: Int): String
- def hasOwnProperty(v: String): Boolean
- Definition Classes
- Object
- def hashCode(): Int
- Definition Classes
- AnyRef → Any
- Annotations
- @native()
- def inherits(constructor: Any, superConstructor: Any): Any
Inherit the prototype methods from one constructor into another.
Inherit the prototype methods from one constructor into another. The prototype of constructor will be set to a new object created from superConstructor.
As an additional convenience, superConstructor will be accessible through the constructor.super_ property.
util.inherits(constructor, superConstructor)
Example: - val inspect: InspectObject
- def isDeepStrictEqual(val1: Any, val2: Any): Boolean
- final def isInstanceOf[T0]: Boolean
- Definition Classes
- Any
- def isPrototypeOf(v: Object): Boolean
- Definition Classes
- Object
- final def ne(arg0: AnyRef): Boolean
- Definition Classes
- AnyRef
- final def notify(): Unit
- Definition Classes
- AnyRef
- Annotations
- @native()
- final def notifyAll(): Unit
- Definition Classes
- AnyRef
- Annotations
- @native()
- val promisify: PromisifyObject
- def propertyIsEnumerable(v: String): Boolean
- Definition Classes
- Object
- final def synchronized[T0](arg0: => T0): T0
- Definition Classes
- AnyRef
- def toLocaleString(): String
- Definition Classes
- Object
- def toString(): String
- Definition Classes
- AnyRef → Any
- val types: UtilTypes
- def valueOf(): Any
- Definition Classes
- Object
- final def wait(): Unit
- Definition Classes
- AnyRef
- Annotations
- @throws(classOf[java.lang.InterruptedException])
- final def wait(arg0: Long, arg1: Int): Unit
- Definition Classes
- AnyRef
- Annotations
- @throws(classOf[java.lang.InterruptedException])
- final def wait(arg0: Long): Unit
- Definition Classes
- AnyRef
- Annotations
- @throws(classOf[java.lang.InterruptedException]) @native()