util.isSymbol()

util.isSymbol(object) Stability: 0 - Deprecated Returns true if the given "object" is a Symbol. Otherwise, returns false. const util = require('util'); util.isSymbol(5) // false util.isSymbol('foo') // false util.isSymbol(Symbol('foo')) // true

util.isString()

util.isString(object) Stability: 0 - Deprecated Returns true if the given "object" is a String. Otherwise, returns false. const util = require('util'); util.isString('') // true util.isString('foo') // true util.isString(String('foo')) // true util.isString(5) // false

util.isRegExp()

util.isRegExp(object) Stability: 0 - Deprecated Returns true if the given "object" is a RegExp. Otherwise, returns false. const util = require('util'); util.isRegExp(/some regexp/) // true util.isRegExp(new RegExp('another regexp')) // true util.isRegExp({}) // false

util.isPrimitive()

util.isPrimitive(object) Stability: 0 - Deprecated Returns true if the given "object" is a primitive type. Otherwise, returns false. const util = require('util'); util.isPrimitive(5) // true util.isPrimitive('foo') // true util.isPrimitive(false) // true util.isPrimitive(null) // true util.isPrimitive(undefined) // true util.isPrimitive({}) // false util.isPrimitive(function() {}) // false util.isPrimitive(/^$/) // false util.isPrimitive(new Date()) // false

util.isObject()

util.isObject(object) Stability: 0 - Deprecated Returns true if the given "object" is strictly an Object and not a Function. Otherwise, returns false. const util = require('util'); util.isObject(5) // false util.isObject(null) // false util.isObject({}) // true util.isObject(function(){}) // false

util.isNumber()

util.isNumber(object) Stability: 0 - Deprecated Returns true if the given "object" is a Number. Otherwise, returns false. const util = require('util'); util.isNumber(false) // false util.isNumber(Infinity) // true util.isNumber(0) // true util.isNumber(NaN) // true

util.isNullOrUndefined()

util.isNullOrUndefined(object) Stability: 0 - Deprecated Returns true if the given "object" is null or undefined. Otherwise, returns false. const util = require('util'); util.isNullOrUndefined(0) // false util.isNullOrUndefined(undefined) // true util.isNullOrUndefined(null) // true

util.isNull()

util.isNull(object) Stability: 0 - Deprecated Returns true if the given "object" is strictly null. Otherwise, returns false. const util = require('util'); util.isNull(0) // false util.isNull(undefined) // false util.isNull(null) // true

util.isFunction()

util.isFunction(object) Stability: 0 - Deprecated Returns true if the given "object" is a Function. Otherwise, returns false. const util = require('util'); function Foo() {} var Bar = function() {}; util.isFunction({}) // false util.isFunction(Foo) // true util.isFunction(Bar) // true

util.isError()

util.isError(object) Stability: 0 - Deprecated Returns true if the given "object" is an Error. Otherwise, returns false. const util = require('util'); util.isError(new Error()) // true util.isError(new TypeError()) // true util.isError({ name: 'Error', message: 'an error occurred' }) // false Note that this method relies on Object.prototype.toString() behavior. It is possible to obtain an incorrect result when the object argument manipulates @@toStringTag. // This example requires the