2024-04-28 10:10:03 +08:00

7 lines
264 B
TypeScript
Raw Permalink Blame History

This file contains ambiguous Unicode characters

This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

// @ts-nocheck
/**
* 检查一个值是否为字符串类型
* @param str 要检查的值
* @returns 如果值的类型是字符串类型,则返回 true否则返回 false
*/
export const isString = (str: unknown): str is string => typeof str === 'string';