MCPcopy
hub / github.com/tdewolff/minify / isString

Function isString

_benchmarks/sample_victory.js:18575–18578  ·  view source on GitHub ↗

* Checks if `value` is classified as a `String` primitive or object. * * @static * @since 0.1.0 * @memberOf _ * @category Lang * @param {*} value The value to check. * @returns {boolean} Returns `true` if `value` is a string, else `false`. * @example * * _.isString('abc'); * // => true *

(value)

Source from the content-addressed store, hash-verified

18573 * // => false
18574 */
18575function isString(value) {
18576 return typeof value == 'string' ||
18577 (!isArray(value) && isObjectLike(value) && baseGetTag(value) == stringTag);
18578}
18579
18580module.exports = isString;
18581

Callers

nothing calls this directly

Calls 3

baseGetTagFunction · 0.85
isArrayFunction · 0.70
isObjectLikeFunction · 0.70

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…