[Pkg-javascript-commits] [node-detective] 18/119: passing failing call dot test

Bastien Roucariès rouca at moszumanska.debian.org
Wed Sep 6 09:44:31 UTC 2017


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

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

commit fc7520d2369190d6b2de3bdf7e4936daeac9947c
Author: James Halliday <mail at substack.net>
Date:   Fri Sep 9 22:25:19 2011 -0700

    passing failing call dot test
---
 index.js | 16 ++++++++++++++++
 1 file changed, 16 insertions(+)

diff --git a/index.js b/index.js
index b7044b5..5007e02 100644
--- a/index.js
+++ b/index.js
@@ -40,6 +40,22 @@ exports.find = function (src) {
                 modules.expressions.push(burrito.deparse(expr));
             }
         }
+        
+        var isDotCallRequire = node.name === 'call'
+            && node.value[0][0] === 'dot'
+            && node.value[0][1][0] === 'call'
+            && node.value[0][1][1][0] === 'name'
+            && node.value[0][1][1][1] === 'require'
+        ;
+        if (isDotCallRequire) {
+            var expr = node.value[0][1][2][0];
+            if (expr[0].name === 'string') {
+                modules.strings.push(expr[1]);
+            }
+            else {
+                modules.expressions.push(burrito.deparse(expr));
+            }
+        }
     });
     
     return modules;

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



More information about the Pkg-javascript-commits mailing list