Skip to content

Commit

Permalink
Browse files Browse the repository at this point in the history
0.2.0 adds forked indexing
  • Loading branch information
thlorenz committed Jul 27, 2013
1 parent 68a7bb9 commit 19be099
Show file tree
Hide file tree
Showing 3 changed files with 7 additions and 6 deletions.
7 changes: 4 additions & 3 deletions README.md
Expand Up @@ -68,12 +68,13 @@ findex(function (err, index) {

###*findex.fork(opts, cb)*

Same as findex, except that it forks a child process to do the work (AST creation can take time).
Same as findex, except that it forks a child process to do the work - AST creation can be slow.

Use this findex alternative if you evaluate lots of files (in larger projects)
and the AST parsing is blocking your main process too much.
and the AST creation is blocking your main process for too long.

The arguments it expects are exactly the same as ***findex(opts, cb)*** does.
The arguments it expects are exactly the same as [***findex(opts,
cb)***](https://github.com/thlorenz/findex#findexopts-cb) does.

###*indexes.find*

Expand Down
4 changes: 2 additions & 2 deletions lib/fork.js
Expand Up @@ -25,8 +25,8 @@ var go = module.exports = function (opts, cb) {
var indexes = msg.indexes;
if (err) return cb(err);

// for some reason the find method gets lost in the message
if (!indexes.find) indexes.find = find.bind(indexes);
// the find method is not passed in the message
indexes.find = find.bind(indexes);
cb(null, indexes);
}

Expand Down
2 changes: 1 addition & 1 deletion package.json
@@ -1,6 +1,6 @@
{
"name": "findex",
"version": "0.1.2",
"version": "0.2.0",
"description": "Indexes locations of functions inside a project by the md5 hash of the function string to find them later.",
"main": "index.js",
"browser": "browser.js",
Expand Down

0 comments on commit 19be099

Please sign in to comment.