G.network.force make .nodes and .links namespaced
We may want to have multiple node filters and multiple link filters independently.
For example, one button may add a maximum node size filter. Another may add a minimum node size filter. With this functionality, these nodes can be turned on and off independently.
Specifically:
force.nodes(fn, ns) sets fn as a filter named ns
force.nodes(fn) sets fn as a filter named undefined
force.nodes(null, ns) removes the filter named ns
force.nodes(null) removes the filter named undefined
force.nodes(ns) returns the filter named ns
force.nodes() returns the filter named undefined
The same applies to .links as well.
Namespaces are one honking great idea. Let's do more of those.