You cannot select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
openNG/templateUtil.js

19 lines
538 B
JavaScript

10 years ago
module.exports = {
conditionalClasses: function(always, conditionals) {
var applicableClasses, applicableConditionals, className, condition;
applicableConditionals = (function() {
var _results;
_results = [];
for (className in conditionals) {
condition = conditionals[className];
if (condition) {
_results.push(className);
}
}
return _results;
})();
applicableClasses = always.concat(applicableConditionals);
return applicableClasses.join(" ");
}
};