glejeune / node-graphviz

Node.js interface to the GraphViz graphing tool
http://algorithmique.net
MIT License
197 stars 58 forks source link

add hasOwnProperty to avoid deep-dredge #23

Open piercus opened 8 years ago

piercus commented 8 years ago

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)) )