1
0
mirror of https://github.com/gryf/pentadactyl-pm.git synced 2026-02-22 17:05:46 +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

@@ -584,7 +584,7 @@ var IO = Module("io", {
let args = Ary(util.range(0, func.length))
.map(bind("createTempFile", this, ext, label)).array;
try {
if (!args.every(util.identity))
if (!args.every(identity))
return false;
var res = func.apply(self || this, args);
}
@@ -979,7 +979,7 @@ unlet s:cpo_save
completion.charset = context => {
context.anchored = false;
context.keys = {
text: util.identity,
text: identity,
description: charset => io.charsetTitle(charset)
};
context.completions = io.charsets;
@@ -1163,7 +1163,7 @@ unlet s:cpo_save
});
options.add(["cdpath", "cd"],
"List of directories searched when executing :cd",
"stringlist", ["."].concat(services.environment.get("CDPATH").split(/[:;]/).filter(util.identity)).join(","),
"stringlist", ["."].concat(services.environment.get("CDPATH").split(/[:;]/).filter(identity)).join(","),
{
get files() {
return this.value.map(path => File(path, modules.io.cwd))