( cellOrValue: any, )
| 35 | 'string' | 'number' | 'boolean' | 'null' | 'object' | 'array'; |
| 36 | |
| 37 | export const getCellOrValueType = ( |
| 38 | cellOrValue: any, |
| 39 | ): CellOrValueType | undefined => { |
| 40 | if (isNull(cellOrValue)) { |
| 41 | return NULL; |
| 42 | } |
| 43 | if (isArray(cellOrValue)) { |
| 44 | return ARRAY; |
| 45 | } |
| 46 | if (isObject(cellOrValue)) { |
| 47 | return OBJECT; |
| 48 | } |
| 49 | const type = getTypeOf(cellOrValue); |
| 50 | return isTypeStringOrBoolean(type) || |
| 51 | (type == NUMBER && isFiniteNumber(cellOrValue as any)) |
| 52 | ? (type as CellOrValueType) |
| 53 | : undefined; |
| 54 | }; |
| 55 | |
| 56 | export const isCellOrValueOrUndefined = (cellOrValue: any): boolean => |
| 57 | isUndefined(cellOrValue) || !isUndefined(getCellOrValueType(cellOrValue)); |
no test coverage detected
searching dependent graphs…