(x)
| 2 | return value !== undefined && value !== null; |
| 3 | } |
| 4 | export function isObj(x) { |
| 5 | const type = typeof x; |
| 6 | return x !== null && (type === 'object' || type === 'function'); |
| 7 | } |
| 8 | export function isNumber(value) { |
| 9 | return /^\d+(\.\d+)?$/.test(value); |
| 10 | } |