From 327304a665432530efb2875f2e1d6c4437502762 Mon Sep 17 00:00:00 2001 From: Doug Kearns Date: Fri, 30 Nov 2007 09:34:31 +0000 Subject: [PATCH] simplify Option#hasName --- content/options.js | 7 +------ 1 file changed, 1 insertion(+), 6 deletions(-) diff --git a/content/options.js b/content/options.js index 9688125b..a0832704 100644 --- a/content/options.js +++ b/content/options.js @@ -98,12 +98,7 @@ vimperator.Option = function (names, type, extraInfo) //{{{ this.hasName = function (name) { - for (var i = 0; i < this.names.length; i++) - { - if (this.names[i] == name) - return true; - } - return false; + return this.names.some(function (e) { return e == name; }); }; this.isValidValue = function (value)