From 6ceae6b02d89bfebbb3bec13ce9525014cbdd2a7 Mon Sep 17 00:00:00 2001 From: Paul Duncan Date: Sat, 2 Apr 2016 02:06:31 -0400 Subject: add search-field and searching to users panel --- data/stuff/js/util.js | 15 +++++++++++++++ 1 file changed, 15 insertions(+) (limited to 'data/stuff/js/util.js') diff --git a/data/stuff/js/util.js b/data/stuff/js/util.js index c021499..ed048ec 100644 --- a/data/stuff/js/util.js +++ b/data/stuff/js/util.js @@ -1,3 +1,18 @@ +$.fn.reduce = (function() { + if (Array.prototype.reduce) { + return Array.prototype.reduce; + } else { + return function(a, cb, r) { + a = [].concat(a); + + for (var i = 0, l = a.length; i < l; i++) + r = cb(r, a[i]); + + return r; + }; + } +})(); + jQuery(function($) { "use strict"; -- cgit v1.2.3