Hacker Newsnew | past | comments | ask | show | jobs | submitlogin

This is cool, but I like jashkenas' version in the comments here better.

As much as anything, this is because I maintain a reflexive aversion to touching `Object.prototype`.

If you're disciplined about avoiding this you can use `for ... in` loops without having to dick around with testing whether the properties are actually directly on your object every time, or writing a wrapper that takes a callback.



Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: