@gvray/eskit
Version:
A rich and colorful toolkit about typescript and javascript.
31 lines • 887 B
JavaScript
;
var __importDefault = (this && this.__importDefault) || function (mod) {
return (mod && mod.__esModule) ? mod : { "default": mod };
};
Object.defineProperty(exports, "__esModule", { value: true });
var isType_1 = __importDefault(require("./isType"));
/**
* Checks if a value is a string.
* 检查值是否为字符串。
*
* @param value - The value to check / 要检查的值
* @returns True if the value is a string / 如果值是字符串则返回true
*
* @example
* ```typescript
* isString('hello') // true
* isString('') // true
* isString(`template`) // true
* isString(123) // false
* isString(null) // false
* isString(undefined) // false
* isString([]) // false
* ```
*
* @since 1.0.0
*/
var isString = function (value) {
return (0, isType_1.default)('String', value);
};
exports.default = isString;
//# sourceMappingURL=isString.js.map