1.0.1 • Published 9 years ago

moduleinfo v1.0.1

Weekly downloads
17
License
-
Repository
github
Last release
9 years ago

moduleinfo

The reverse search tool for module.

Getting Started

Install the module with: npm install moduleinfo

var some_module = require('some_module');
var moduleinfo = require('moduleinfo');
var some_module_info = moduleinfo(some_module);

Documentation

This module returns a function to search module information.
Calling this function with module object that was 'require()'ed will return the module information object, which contains path to the module source and parsed json object of 'package.json'(if present).
The returned object will be formed like:

{
  path: path_to_source_of_module,
  packagejson: parsed_package_json_object
}

Because not all modules has its 'package.json', so 'packagejson' key will not have value for such modules.

Examples

(Coming soon)

Contributing

In lieu of a formal styleguide, take care to maintain the existing coding style. Add unit tests for any new or changed functionality. Lint and test your code using Grunt.

Release History

versiondescription
1.0.0First Release
1.0.1Readme updated

License

Copyright (c) 2015 Hiroyoshi Kurohara
Licensed under the MIT license.