cxc-szcx-uniapp/uni_modules/lime-shared/isString/index.ts

20 lines
520 B
TypeScript
Raw Normal View History

2024-09-14 02:26:50 +00:00
// @ts-nocheck
/**
*
* @param str
* @returns true false
*/
2025-02-11 01:34:29 +00:00
// #ifndef UNI-APP-X && APP
2024-09-14 02:26:50 +00:00
// export const isString = (str: unknown): str is string => typeof str === 'string';
export function isString (str: unknown): str is string {
return typeof str == 'string'
}
// #endif
2025-02-11 01:34:29 +00:00
// #ifdef UNI-APP-X && APP
export function isString (str: any|null): boolean {
2024-09-14 02:26:50 +00:00
return typeof str == 'string'
}
// #endif