root-probe
v0.1.2
Published
The 'root-probe' returns information (such as dependecies) about the first parent module in the path hierarchy
Downloads
2
Maintainers
Readme
node-root-probe
The 'root-probe' returns information (such as dependecies) about the first parent module in the path hierarchy.
Take a look to the TODO if you want to help towards the next steps.
Installation
Node Dependencies
Add following line to your project dependencies
"root-probe": "0.1.x",
then hit
npm install
Require module
var probe = require('root-probe');
Usage
[property] means the property is only set it a value was found
Probe Object
The Probe is an extention of the Root Object provided by the root-finder package
root-probe adds following properties to the Root Object:
status
: 'OK' if the probe was processed without problems, 'ERROR' otherwisetimestamp
: the time at which the probe was generatedhostname
: the name of the hostip
: the ip address from the network adapterversion
: the version of the package[version_hash]
: the parsed content of .git/HEADdependencies
: the parent module's dependencies as array of objects formated as follows
Dependecy Object
type
: string - specifies it is a Node ('node') or Bower ('bower') dependencyproduction
: boolean - specifies it is a production dependencypath
: string - path to the dependencyname
: string - the name dependency moduleversion
: string - the dependency module's version[description]
: string - the dependency module's description[keywords]
: array of strings - the dependency module's keywords[homepage]
: string - the dependency module's homepage[repository_url]
: string - the dependency module's repository_url[engines_node]
: string - the dependency module's supported version of node
Access Values
Access the values with the point notation:
var probe = require('root-probe');
// get parent module's name
probe.name
// get root path
probe.path
// get list of dependencies
probe.dependencies