voca
Version:
The ultimate JavaScript string library
22 lines (20 loc) • 465 B
JavaScript
/**
* Checks whether `subject` is a string primitive type.
*
* @function isString
* @static
* @since 1.0.0
* @memberOf Query
* @param {string} subject The value to verify.
* @return {boolean} Returns `true` if `subject` is string primitive type or `false` otherwise.
* @example
* v.isString('vacation');
* // => true
*
* v.isString(560);
* // => false
*/
function isString(subject) {
return typeof subject === 'string';
}
export default isString;