mirror of
https://github.com/reddit-archive/reddit.git
synced 2026-01-29 16:58:21 -05:00
Add client-side "tup" util function.
This commit is contained in:
@@ -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 || '*')
|
||||
|
||||
Reference in New Issue
Block a user