mirror of
https://github.com/gryf/pentadactyl-pm.git
synced 2025-12-22 09:17:59 +01:00
Move Command's property definitions outside init.
--HG-- extra : rebase_source : 2237c2350957975938140d4f4c556898763ef7d3
This commit is contained in:
@@ -805,6 +805,15 @@ const Util = Module("util", {
|
||||
return obj;
|
||||
},
|
||||
|
||||
/**
|
||||
* Compacts an array, removing all elements that are null or undefined:
|
||||
* ["foo", null, "bar", undefined] -> ["foo", "bar"]
|
||||
*
|
||||
* @param {Array} ary
|
||||
* @returns {Array}
|
||||
*/
|
||||
compact: function compact(ary) ary.filter(function (item) item != null),
|
||||
|
||||
/**
|
||||
* Flattens an array, such that all elements of the array are
|
||||
* joined into a single array:
|
||||
|
||||
Reference in New Issue
Block a user