UNPKG

@nodescript/stdlib

Version:
26 lines (25 loc) 606 B
export const module = { version: '1.1.4', moduleName: 'Logic / And', description: 'Returns false if any of the specified conditions are false, or true otherwise.', keywords: ['all', 'every'], 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 false; } } return true; };