FazBrowse GitHub Viewer | Trending |
URL:
| Home
Tools: [Download Repo ZIP]   [Original HTTPS Page]

Fix tree walk example by billytrend · Pull Request #59 · nodegit/nodegit.github.com · GitHub

Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension .md  (1) All 1 file type selected
Viewed files
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Unified
Split
Hide whitespace
Diff view
Unified
Split
Hide whitespace
5 changes: 4 additions & 1 deletion api/tree/index.md
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode characters
Original file line number Diff line number Diff line change
Expand Up @@ -334,7 +334,7 @@ Return the path of this tree, like `/lib/foo/bar`
## <a name="walk"></a><span>Tree#</span>walk <span class="tags"><span class="sync">Sync</span></span>

```js
var eventEmitter = tree.walk([blobsOnly);
var eventEmitter = tree.walk();

eventEmitter.on('entry', function(tree) {
// Use tree
Expand All @@ -347,6 +347,9 @@ eventEmitter.on('end', function(trees) {
eventEmitter.on('error', function(error) {
// Use error
});

// start walking the tree
eventEmitter.start()
```

Recursively walk the tree in breadth-first order. Fires an event for each
Expand Down

Back | FazBrowse Home | New Git URL