module-data
This module gathers a module's statistical data. There are three statistical data types and those are local data
, remote data
and standard data
, being the last one a merge between the first two.
You can see here the data structure of those three statistical data types.
Installation
$ npm i module-data
Documentation
Core
Toolbox
Core
local(modulePath, [options,] callback)
This method will traverse local module data and return a tree based on this schema.
var localData = local var options = depth: 10
remote(moduleName, options, callback)
This method will query remotely the module data and return a flat object based on this schema.
var remoteData = remote var options = version: '1.0.0'
Toolbox
dependenciesSet(data)
This method will return a dependencies' Set
object from the local data tree.
var getDepsTree = var localData = ... // {// 'async': ['1.0.0', '1.1.2'],// 'request': ['0.1.0']// }var depsTree =
standardize(data, callback)
This method will merge local data
and remote data
into a standard data
.
var standardize = var data = local: ... remote: ...
validate(type, data, callback)
This method validates local data
, remote data
and standard data
.
var validate = var localData = ... var remoteData = ... var standardData = ... { ...}