npmgraphbuilder
Builds graph of npm dependencies from npm registry. A graph is an instance of
ngraph.graph
.
Demo
This library is not bound to any particular http client. It requires http client to be injected into constructor:
var graph = ;var graphBuilder = httpClient;graphBuilder;
Here httpClient
is a function (url, data) {}
, which returns a promise.
A demo of httpClient
, implemented in angular.js:
{// since we will be using from a web browser, make sure jsonp is enabled:datacallback = 'JSON_CALLBACK';return $http;}
A demo of httpClient
implemented in node.js:
var q = ; // npm install qvar http = ; // stadard httpvar querystring = ; // standard query string{var defer = qdefer;http;return deferpromise;}
To see working demo please refer to demo
folder.
install
With npm do:
npm install npmgraphbuilder
license
MIT