Replace regex with javascript parser
Closed this issue · 2 comments
siddharthkp commented
Pointed out on hacker news
Regular expressions are a very naive way of detecting calls to 'require'. For correctness you're better off recursively walking the AST.
I've successfully used Detective in a couple of my personal projects to find all require statements.
Relevant issue on Detective: browserify/detective#8
siddharthkp commented
Replaced with node-detective in c58631d
siddharthkp commented