is-string
isString(obj)
Deprecated:
This method is will be removed in can-util 4.0.
Use typeof obj === 'string'
instead of isString(obj)
.
Determines if the provided argument is a string.
var isString = require("can-util/js/is-string/is-string");
console.log(isString("foo")); // -> true
console.log(isString(String("foo")); // -> true
console.log(isString({})); // -> false
Parameters
- obj
{*}
:An object to test if is a string.
Returns
{Boolean}
:
True if the object is a string.