UNPKG

todomvc

Version:

> Helping you select an MV\* framework

21 lines (19 loc) 465 B
/*global define*/ (function () { 'use strict'; /* * A set of commonly used functions. * They're useful for several UIs in the app. * They could also be reused in other projects */ define('Todos/Tools', { // className is set to the 'this' dom node according to the value's truthiness 'toggleClass': function (value, className) { if (value) { this.classList.add(className); } else { this.classList.remove(className); } } }); })();