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

20 lines
520 B
TypeScript
Raw Normal View History

2025-03-06 18:35:00 +00:00
// @ts-nocheck
/**
*
* @param str
* @returns true false
*/
// #ifndef UNI-APP-X && APP
// 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 UNI-APP-X && APP
export function isString (str: any|null): boolean {
return typeof str == 'string'
}
// #endif