mirror of
https://github.com/n8n-io/n8n.git
synced 2024-11-14 16:44:07 -08:00
🔨 Refactor type guard for readability
This commit is contained in:
parent
bd1b81eefc
commit
12379c1d90
|
@ -18,7 +18,7 @@ const TAG_NAME_LENGTH_LIMIT = 24;
|
|||
* Type guard for string array.
|
||||
*/
|
||||
function isStringArray(tags: unknown[]): tags is string[] {
|
||||
return Array.isArray(tags) && !tags.some((value) => typeof value !== 'string');
|
||||
return Array.isArray(tags) && tags.every((value) => typeof value === 'string');
|
||||
}
|
||||
|
||||
/**
|
||||
|
|
Loading…
Reference in a new issue