Skip to content

Comments

add hasOwnProperty to avoid deep-dredge#23

Open
piercus wants to merge 1 commit intoglejeune:masterfrom
piercus:master
Open

add hasOwnProperty to avoid deep-dredge#23
piercus wants to merge 1 commit intoglejeune:masterfrom
piercus:master

Conversation

@piercus
Copy link

@piercus piercus commented Mar 7, 2016

Adding

object.hasOwnProperty(key) 

Condition on each for( in ) loop.

Following JavaScript best practices (see for example https://gist.github.com/aaronshaf/5663660 Deep members must be explicitly filtered (obj.hasOwnProperty(prop)) )

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant