(value: unknown)
| 13 | export const isArray = (value: any): value is any[] => Array.isArray(value) |
| 14 | |
| 15 | export const isPrimitiveType = (value: unknown): value is PrimitiveType => { |
| 16 | const type = typeof value |
| 17 | return type === 'string' || type === 'number' || type === 'boolean' || value === null || value === undefined |
| 18 | } |
| 19 | |
| 20 | /** Returns true if value extends basic Object prototype and is not a Date */ |
| 21 | export const isObjectLiteral = <T>(value: any): value is T extends unknown ? Record<string, any> : T => |