discourse/app/assets/javascripts/truth-helpers/addon/helpers/and.js

14 lines
217 B
JavaScript

import truthConvert from "../utils/truth-convert";
export default function and(...args) {
let arg = false;
for (arg of args) {
if (truthConvert(arg) === false) {
return arg;
}
}
return arg;
}