mirror of
https://github.com/ether/etherpad-lite.git
synced 2025-04-21 16:06:16 -04:00
hooks: Delete unused flatten
function
This commit is contained in:
parent
b5c759cbac
commit
55939a0d7e
1 changed files with 0 additions and 16 deletions
|
@ -76,22 +76,6 @@ exports.mapFirst = function (lst, fn, cb, predicate) {
|
||||||
next();
|
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) {
|
exports.callAll = function (hook_name, args) {
|
||||||
if (!args) args = {};
|
if (!args) args = {};
|
||||||
if (pluginDefs.hooks[hook_name] === undefined) return [];
|
if (pluginDefs.hooks[hook_name] === undefined) return [];
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue