knowledge-graph/knowledge-graph — pull request #2 by eightyeight (2014-04-01 04:22:56+00:00)
Title: Plugin names

Allows plugins to be activated by name, instead of by object reference. For example,

knowledgeGraph.create({
graph: {},
plugins: ['editing']
});

The `api` parameter to the `KnowledgeGraph` constructor was passed so that the constructed graph could access `api.plugins` without relying on the global name `knowledgeGraph` being defined. It prevents a jsHint warning, and will work even if we change the global variable's name, or provide builds that don't export it or whatever. Open to suggestions to improve it.