1
0
mirror of https://github.com/gryf/pentadactyl-pm.git synced 2026-01-06 05:14:11 +01:00

Move util.identity to the base module.

Most other functions of its ilk live there.
This commit is contained in:
Doug Kearns
2015-06-11 03:10:16 +10:00
parent 6ca1cc3d08
commit 59613afb27
20 changed files with 49 additions and 46 deletions

View File

@@ -917,7 +917,7 @@ var Commands = Module("commands", {
* @returns {Command}
*/
get: function get(name, full) iter(this.hives).map(([i, hive]) => hive.get(name, full))
.find(util.identity),
.find(identity),
/**
* Returns true if a command invocation contains a URL referring to the
@@ -1569,7 +1569,7 @@ var Commands = Module("commands", {
let quote = RegExp.$2;
context.quote = null;
context.offset -= idx;
context.filter = str.substr(0, idx) + (quote ? Option.quote : util.identity)(context.filter);
context.filter = str.substr(0, idx) + (quote ? Option.quote : identity)(context.filter);
context.fork("ex", 0, completion, "ex");
};