bevry/watchr — pull request #10 by BenjieGillam (2012-05-23 14:18:53+00:00)
Title: watchr.watch(2 arguments) doesn't work -> make arguments parsing more flexible

Sorry for the unsolicited pull request - rather than just reporting the bug I thought I'd propose a solution.

Currently the example from README.md:
```
watchr.watch(path,function(eventName,filePath,fileCurrentStat,filePreviousStat){
console.log('a watch event occured:',arguments);
});
```
doesn't function, since it only has 2 arguments (neither 1 nor 3). Rather than writing a separate branch for the case of 2 arguments (or rewriting the 3 arguments branch), I've rewritten the arguments processing. Hopefully the code is self explanatory, and allows for much more flexible expression of intentions.

I won't be offended if you reject this pull request, it was unsolicited and is more substantial than necessary.