MCPcopy Index your code
hub / github.com/bombshell-dev/clack / isActionKey

Function isActionKey

packages/core/src/utils/settings.ts:179–191  ·  view source on GitHub ↗
(key: string | Array<string | undefined>, action: Action)

Source from the content-addressed store, hash-verified

177 * @returns boolean
178 */
179export function isActionKey(key: string | Array<string | undefined>, action: Action) {
180 if (typeof key === 'string') {
181 return settings.aliases.get(key) === action;
182 }
183
184 for (const value of key) {
185 if (value === undefined) continue;
186 if (isActionKey(value, action)) {
187 return true;
188 }
189 }
190 return false;
191}

Callers 2

clearFunction · 0.85
onKeypressMethod · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected