[Pkg-javascript-commits] [uglifyjs] 132/190: Simplify member(name, array) implementation.
Antonio Terceiro
terceiro at moszumanska.debian.org
Sun Aug 7 23:17:20 UTC 2016
This is an automated email from the git hooks/post-receive script.
terceiro pushed a commit to annotated tag upstream/2.7.0
in repository uglifyjs.
commit c70d176f359c5640d3eb64a639958bec5fe45f7e
Author: kzc <zaxxon2011 at gmail.com>
Date: Thu Apr 7 09:57:30 2016 -0400
Simplify member(name, array) implementation.
---
lib/utils.js | 5 +----
1 file changed, 1 insertion(+), 4 deletions(-)
diff --git a/lib/utils.js b/lib/utils.js
index c81ca71..78c6dbf 100644
--- a/lib/utils.js
+++ b/lib/utils.js
@@ -59,10 +59,7 @@ function characters(str) {
};
function member(name, array) {
- for (var i = array.length; --i >= 0;)
- if (array[i] == name)
- return true;
- return false;
+ return array.indexOf(name) >= 0;
};
function find_if(func, array) {
--
Alioth's /usr/local/bin/git-commit-notice on /srv/git.debian.org/git/pkg-javascript/uglifyjs.git
More information about the Pkg-javascript-commits
mailing list