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