MCPcopy Index your code
hub / github.com/simstudioai/sim / isValidKey

Function isValidKey

apps/sim/lib/workflows/sanitization/key-validation.ts:5–9  ·  view source on GitHub ↗
(key: unknown)

Source from the content-addressed store, hash-verified

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

Calls

no outgoing calls

Tested by

no test coverage detected