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

20 lines
527 B
TypeScript
Raw Normal View History

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