@ibm-functions/composer
Advanced tools
Comparing version 0.5.0 to 0.5.1
@@ -339,6 +339,7 @@ /* | ||
const arg = combinator.args[i] | ||
const argument = arg.optional ? arguments[i] || null : arguments[i] | ||
const argument = arguments[i] | ||
if (argument === undefined && arg.optional && arg.type !== undefined) continue | ||
switch (arg.type) { | ||
case undefined: | ||
composition[arg._] = composer.task(argument) | ||
composition[arg._] = this.task(arg.optional ? argument || null : argument) | ||
continue | ||
@@ -350,3 +351,3 @@ case 'value': | ||
case 'object': | ||
if (!isObject(argument)) throw new ComposerError('Invalid argument', argument) | ||
if (argument === null || Array.isArray(argument)) throw new ComposerError('Invalid argument', argument) | ||
default: | ||
@@ -353,0 +354,0 @@ if (typeof argument !== arg.type) throw new ComposerError('Invalid argument', argument) |
{ | ||
"name": "@ibm-functions/composer", | ||
"version": "0.5.0", | ||
"version": "0.5.1", | ||
"description": "Composer is an IBM Cloud Functions programming model for composing individual functions into larger applications.", | ||
@@ -5,0 +5,0 @@ "homepage": "https://github.com/ibm-functions/composer", |
150809
1334