hooks: Delete unused flatten function

This commit is contained in:
Richard Hansen 2020-10-10 21:20:45 -04:00 committed by John McLear
parent b5c759cbac
commit 55939a0d7e

View file

@ -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 [];