-
Notifications
You must be signed in to change notification settings - Fork 697
Open
Description
System information
- node version: v10.13.0
- npm or yarn version: 6.4.1
- OS/version/architecture: gLinux 64-bit (Google-internal, like Debian Testing)
- Applicable nodegit version: v0.23.0 built from source
https://www.nodegit.org/api/tree/ has an example of how to use tree.walk(), but it doesn't mention a critical detail, which is mentioned in an example:
Lines 22 to 23 in 1f84d31
| // Don't forget to call `start()`! | |
| walker.start(); |
It looks like the start() method is added to the instance here:
Lines 145 to 146 in 1f84d31
| event.start = function() { | |
| bfs(null, self); |
It took me quite a while to work out what the problem was, looking at the EventEmitter documentation would not have helped. I'm not sure if subclassing from EventEmitter is a good idea, but having a TreeWalker class where the this is documented would have made it easier to discover.
rigdern