Skip to content

Commit

Permalink
document opts.word
Browse files Browse the repository at this point in the history
  • Loading branch information
James Halliday committed Nov 26, 2011
1 parent 584d2c4 commit b8d654a
Showing 1 changed file with 9 additions and 4 deletions.
13 changes: 9 additions & 4 deletions README.markdown
Original file line number Diff line number Diff line change
Expand Up @@ -39,20 +39,25 @@ methods

var detective = require('detective');

detective(src)
--------------
detective(src, opts)
--------------------

Give some source body `src`, return an array of all the require()s with string
arguments.

detective.find(src)
-------------------
The options parameter `opts` is passed along to `detective.find()`.

detective.find(src, opts)
-------------------------

Give some source body `src`, return an object with "strings" and "expressions"
arrays for each of the require() calls.

The "expressions" array will contain the stringified expressions.

Optionally you can specify a different function besides `"require"` to analyze
with `opts.word`.

installation
============

Expand Down

0 comments on commit b8d654a

Please sign in to comment.