From 55939a0d7e201953c8b91b6b005c606023e2d2d6 Mon Sep 17 00:00:00 2001 From: Richard Hansen Date: Sat, 10 Oct 2020 21:20:45 -0400 Subject: [PATCH] hooks: Delete unused `flatten` function --- src/static/js/pluginfw/hooks.js | 16 ---------------- 1 file changed, 16 deletions(-) diff --git a/src/static/js/pluginfw/hooks.js b/src/static/js/pluginfw/hooks.js index 13e36a64..3032db36 100644 --- a/src/static/js/pluginfw/hooks.js +++ b/src/static/js/pluginfw/hooks.js @@ -76,22 +76,6 @@ exports.mapFirst = function (lst, fn, cb, predicate) { next(); } - -/* Don't use Array.concat as it flatterns arrays within the array */ -exports.flatten = function (lst) { - var res = []; - if (lst != undefined && lst != null) { - for (var i = 0; i < lst.length; i++) { - if (lst[i] != undefined && lst[i] != null) { - for (var j = 0; j < lst[i].length; j++) { - res.push(lst[i][j]); - } - } - } - } - return res; -} - exports.callAll = function (hook_name, args) { if (!args) args = {}; if (pluginDefs.hooks[hook_name] === undefined) return [];