substack/js-traverse — pull request #27 by crcn (2012-10-30 04:46:55+00:00)
Title: replace Object.keys(target) w/ for(var key in target) { }

Both functions behave differently. Take this for example:

```javascript
var Post = function(title, message) {
this.title = title;
this.message = message;
}

Post.prototype.collection = "posts";

Post.prototype.findOne = function() {
//do stuff
}

Post.prototype.find = function() {
//do more stuff
}

function objectKeys(target) {
var keys = [];
for(var k in target) keys.push(k);
return keys;
}

var post = new Post("test", "message");
console.log(Object.keys(post)); //["title", "message"]
console.log(objectKeys(post)); //["title", "message", "collection", "findOne", "find"]
```