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

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

14 lines
215 B
JavaScript
Raw Normal View History

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