[Pkg-javascript-commits] [node-lexical-scope] 04/83: drop function arguments from the globals output

Bastien Roucariès rouca at moszumanska.debian.org
Fri Dec 15 09:45:45 UTC 2017


This is an automated email from the git hooks/post-receive script.

rouca pushed a commit to branch master
in repository node-lexical-scope.

commit e89db42936c4100eb0184de0e742d0bdaae4632b
Author: James Halliday <mail at substack.net>
Date:   Sun Feb 17 14:20:41 2013 +1000

    drop function arguments from the globals output
---
 index.js | 2 ++
 1 file changed, 2 insertions(+)

diff --git a/index.js b/index.js
index 8998250..2575b44 100644
--- a/index.js
+++ b/index.js
@@ -24,6 +24,8 @@ module.exports = function (src) {
             if (node.parent.type === 'MemberExpression'
             && node.parent.property === node) return;
             
+            if (isFunction(node.parent)) return;
+            
             globals[node.name] = true;
         }
     });

-- 
Alioth's /usr/local/bin/git-commit-notice on /srv/git.debian.org/git/pkg-javascript/node-lexical-scope.git



More information about the Pkg-javascript-commits mailing list