function isSymbol
Jump to headingisSymbol(object: unknown): object is symbolDeprecated
Returns true if the given object is a Symbol. Otherwise, returns false.
import util from 'node:util';
util.isSymbol(5);
// Returns: false
util.isSymbol('foo');
// Returns: false
util.isSymbol(Symbol('foo'));
// Returns: true
Parameters Jump to heading
Jump to headingobject: unknownReturn Type Jump to heading
object is symbol