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

Ignoring revisions in .git-blame-ignore-revs. Click here to bypass and see the normal blame view.

14 lines
217 B
JavaScript
Raw Normal View History

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;
}