(key: string | Array<string | undefined>, action: Action)
| 177 | * @returns boolean |
| 178 | */ |
| 179 | export 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 | } |
no outgoing calls
no test coverage detected