Returns true
if the given object
is a Symbol
. Otherwise, returns false
.
const util = require('util');
util.isSymbol(5);
// Returns: false
util.isSymbol('foo');
// Returns: false
util.isSymbol(Symbol('foo'));
// Returns: true
Since v4.0.0 - Use typeof value === 'symbol'
instead.
Generated using TypeDoc
Returns
true
if the givenobject
is aSymbol
. Otherwise, returnsfalse
.Deprecated
Since v4.0.0 - Use
typeof value === 'symbol'
instead.