UNPKG

tdesign-react

Version:
39 lines (33 loc) 888 B
/** * tdesign v1.15.1 * (c) 2025 tdesign * @license MIT */ 'use strict'; var _baseGetTag = require('./dep-25585736.js'); var isArray = require('./dep-64577888.js'); var isObjectLike = require('./dep-62e73936.js'); /** `Object#toString` result references. */ var stringTag = '[object String]'; /** * 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 * * _.isString(1); * // => false */ function isString(value) { return typeof value == 'string' || !isArray.isArray(value) && isObjectLike.isObjectLike(value) && _baseGetTag.baseGetTag(value) == stringTag; } exports.isString = isString; //# sourceMappingURL=dep-4ed9eda4.js.map