load-module
Advanced tools
Comparing version 0.1.0 to 0.1.1
@@ -6,3 +6,6 @@ 'use strict' | ||
/** | ||
* Load a module. | ||
* @module load-module | ||
* @example | ||
* const loadModule = require('load-module') | ||
*/ | ||
@@ -15,2 +18,6 @@ module.exports = loadModule | ||
* @alias module:load-module | ||
* @param {string} - module path | ||
* @param [options] {object} | ||
* @param [options.module-prefix] {string} | ||
* @param [options.module-dir] {string|string[]} | ||
*/ | ||
@@ -46,3 +53,2 @@ function loadModule (modulePath, options) { | ||
try { | ||
// console.error(potentialPath) | ||
result = require(potentialPath) | ||
@@ -49,0 +55,0 @@ break |
{ | ||
"name": "load-module", | ||
"author": "Lloyd Brookes <75pound@gmail.com>", | ||
"version": "0.1.0", | ||
"version": "0.1.1", | ||
"description": "load-module", | ||
@@ -18,3 +18,3 @@ "repository": "https://github.com/75lb/load-module.git", | ||
"test": "test-runner test/*.js", | ||
"docs": "jsdoc2md -t jsdoc2md/README.hbs lib/*.js > README.md; echo" | ||
"docs": "jsdoc2md -t README.hbs load-module.js > README.md; echo" | ||
}, | ||
@@ -24,3 +24,6 @@ "devDependencies": { | ||
"test-runner": "^0.3.0" | ||
}, | ||
"dependencies": { | ||
"array-back": "^1.0.4" | ||
} | ||
} |
@@ -7,2 +7,26 @@ [![view on npm](https://img.shields.io/npm/v/load-module.svg)](https://www.npmjs.org/package/load-module) | ||
# load-module | ||
<a name="module_load-module"></a> | ||
## load-module | ||
Load a module. | ||
**Example** | ||
```js | ||
const loadModule = require('load-module') | ||
``` | ||
<a name="exp_module_load-module--loadModule"></a> | ||
### loadModule(modulePath, [options]) ⏏ | ||
**Kind**: Exported function | ||
| Param | Type | Description | | ||
| --- | --- | --- | | ||
| modulePath | <code>string</code> | module path | | ||
| [options] | <code>object</code> | | | ||
| [options.module-prefix] | <code>string</code> | | | ||
| [options.module-dir] | <code>string</code> \| <code>Array.<string></code> | | | ||
* * * | ||
© 2017 Lloyd Brookes \<75pound@gmail.com\>. Documented by [jsdoc-to-markdown](https://github.com/jsdoc2md/jsdoc-to-markdown). |
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
9394
161
32
1
+ Addedarray-back@^1.0.4
+ Addedarray-back@1.0.4(transitive)
+ Addedtypical@2.6.1(transitive)