Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

load-module

Package Overview
Dependencies
Maintainers
1
Versions
25
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

load-module - npm Package Compare versions

Comparing version 0.1.0 to 0.1.1

8

load-module.js

@@ -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

7

package.json
{
"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.&lt;string&gt;</code> | |
* * *
&copy; 2017 Lloyd Brookes \<75pound@gmail.com\>. Documented by [jsdoc-to-markdown](https://github.com/jsdoc2md/jsdoc-to-markdown).
SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc