UNPKG

voca

Version:

The ultimate JavaScript string library

24 lines (21 loc) 482 B
'use strict'; /** * 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'; } module.exports = isString;