Skip to content

Commit

Permalink
now works with shebang lines
Browse files Browse the repository at this point in the history
  • Loading branch information
James Halliday committed Feb 25, 2013
1 parent fd3a84e commit 2487a7b
Showing 1 changed file with 1 addition and 0 deletions.
1 change: 1 addition & 0 deletions index.js
Expand Up @@ -31,6 +31,7 @@ exports.find = function (src, opts) {
if (!opts) opts = {};
var word = opts.word === undefined ? 'require' : opts.word;
if (typeof src !== 'string') src = String(src);
src = src.replace(/^#![^\n]*\n/, '');

function isRequire (node) {
var c = node.callee;
Expand Down

0 comments on commit 2487a7b

Please sign in to comment.