Init string array input
[arvados-workbench2.git] / src / models / workflow.ts
index d7d97c4c962401bfc7bd5ff655ebe88fdaf4d92d..59915137427d118167dd14d174574a3fcbdbf3f6 100644 (file)
@@ -141,6 +141,12 @@ export const isPrimitiveOfType = (input: GenericCommandInputParameter<any, any>,
         ? input.type.indexOf(type) > -1
         : input.type === type;
 
+export const isArrayOfType = (input: GenericCommandInputParameter<any, any>, type: CWLType) =>
+    typeof input.type === 'object' &&
+        input.type.type === 'array'
+        ? input.type.items === type
+        : false;
+
 export const stringifyInputType = ({ type }: CommandInputParameter) => {
     if (typeof type === 'string') {
         return type;