Permalink
Browse files

re-indent

  • Loading branch information...
1 parent 0c4ccf3 commit c84db78d6354a97e64537e25c7ef2343bec2992d @substack committed Feb 1, 2014
Showing with 6 additions and 6 deletions.
  1. +6 −6 index.js
View
@@ -34,11 +34,11 @@ exports.find = function (src, opts) {
if (!opts) opts = {};
opts.parse = opts.parse || {};
opts.parse.tolerant = true;
-
+
var word = opts.word === undefined ? 'require' : opts.word;
if (typeof src !== 'string') src = String(src);
src = src.replace(/^#![^\n]*\n/, '');
-
+
var isRequire = opts.isRequire || function (node) {
var c = node.callee;
return c
@@ -47,12 +47,12 @@ exports.find = function (src, opts) {
&& c.name === word
;
}
-
+
var modules = { strings : [], expressions : [] };
if (opts.nodes) modules.nodes = [];
-
+
if (src.indexOf(word) == -1) return modules;
-
+
walk(src, opts.parse, function (node) {
if (!isRequire(node)) return;
if (node.arguments.length
@@ -64,6 +64,6 @@ exports.find = function (src, opts) {
}
if (opts.nodes) modules.nodes.push(node);
});
-
+
return modules;
};

0 comments on commit c84db78

Please sign in to comment.