Closed ljharb closed 11 years ago
This should only occur, when people extend Object.prototype
(which is a bad pratice in the first place).
However this is an issue, and we should fix that. But I'm a little reluctant with adding new deps...
Especially, when we could fix that with one line of code. Haha. ;)
if(obj[key] !== obj.constructor.prototype[key]) ret.push(key)
What do you think about that?
this should be fine, I agree it's bad practice, but people seem to do it lots :s
To be a proper object-keys shim, it has to only iterate over own properties.
Would you be OK adding a dependency,
object-keys
? It's a well-tested Object.keys shim.