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

14 lines
215 B
JavaScript

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