(key: unknown)
| 3 | * Use this to validate BEFORE setting a dynamic key on any object. |
| 4 | */ |
| 5 | export function isValidKey(key: unknown): key is string { |
| 6 | return ( |
| 7 | !!key && typeof key === 'string' && key !== 'undefined' && key !== 'null' && key.trim() !== '' |
| 8 | ) |
| 9 | } |
no outgoing calls
no test coverage detected