mirror of
https://github.com/gryf/pentadactyl-pm.git
synced 2026-04-03 00:13:32 +02:00
simplify Option#hasName
This commit is contained in:
@@ -98,12 +98,7 @@ vimperator.Option = function (names, type, extraInfo) //{{{
|
|||||||
|
|
||||||
this.hasName = function (name)
|
this.hasName = function (name)
|
||||||
{
|
{
|
||||||
for (var i = 0; i < this.names.length; i++)
|
return this.names.some(function (e) { return e == name; });
|
||||||
{
|
|
||||||
if (this.names[i] == name)
|
|
||||||
return true;
|
|
||||||
}
|
|
||||||
return false;
|
|
||||||
};
|
};
|
||||||
|
|
||||||
this.isValidValue = function (value)
|
this.isValidValue = function (value)
|
||||||
|
|||||||
Reference in New Issue
Block a user