Add client-side "tup" util function.

This commit is contained in:
Max Goodman
2013-05-20 14:28:32 -07:00
parent 85e72f5b35
commit 0060fca40a

View File

@@ -16,6 +16,13 @@ r.utils = {
}).join('')
},
tup: function(list) {
if (!_.isArray(list)) {
list = [list]
}
return list
},
querySelectorFromEl: function(targetEl, selector) {
return $(targetEl).parents().andSelf()
.filter(selector || '*')