substack/js-traverse — pull request #12 by karlbohlmark (2011-10-13 22:07:33+00:00)
Title: Remove and delete should have a 'stopHere' option, just like update

I got bitten by the fact that

this.remove() in
```
var scrubbed = traverse(obj).map(function (x) {
if (this.circular) this.remove()
});
```

does not stop the traversal, which causes this code to loop indefinitely when obj contains a DOM reference.

It seems reasonable to me to have a flag for stopping traversal, analogous to the this.update method.

(I've never sent a pull request before so excuse me if I'm doing smth stupid)