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

20 lines
476 B
TypeScript
Raw Normal View History

2024-09-14 02:26:50 +00:00
// @ts-nocheck
/**
*
* @param val
* @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 isObject = (val : unknown) : val is Record<any, any> =>
val !== null && typeof val === 'object';
// #endif
2025-02-11 01:34:29 +00:00
// #ifdef UNI-APP-X && APP
2024-09-14 02:26:50 +00:00
export const isObject = (val : any | null) : boolean =>{
return val !== null && typeof val === 'object';
}
// #endif