UNPKG

@nodescript/stdlib

Version:
26 lines (25 loc) 602 B
export const module = { version: '1.1.4', moduleName: 'Logic / Or', description: 'Returns true if any of the specified conditions are true, or false otherwise.', keywords: ['any', 'some'], params: { conditions: { schema: { type: 'array', items: { type: 'boolean' }, }, }, }, result: { schema: { type: 'boolean' }, } }; export const compute = params => { for (const condition of params.conditions) { if (condition) { return true; } } return false; };