Skip to content

Commit

Permalink
fix nodes and paths
Browse files Browse the repository at this point in the history
  • Loading branch information
James Halliday committed Sep 4, 2010
1 parent 4400d88 commit 78edd30
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions lib/traverse.js
Original file line number Diff line number Diff line change
Expand Up @@ -106,15 +106,15 @@ function Traverse (refObj) {

this.paths = function () {
var acc = [];
this.each(function (x) {
this.forEach(function (x) {
acc.push(this.path);
});
return acc;
};

this.nodes = function () {
var acc = [];
this.each(function (x) {
this.forEach(function (x) {
acc.push(this.node);
});
return acc;
Expand All @@ -133,10 +133,10 @@ Traverse.forEach = function (obj, f) {
Traverse(obj).forEach(f);
};

Traverse.paths = function () {
Traverse.paths = function (obj) {
return Traverse(obj).paths();
};

Traverse.nodes = function () {
Traverse.nodes = function (obj) {
return Traverse(obj).nodes();
};

0 comments on commit 78edd30

Please sign in to comment.