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.2 to 0.1.3

2

package.json
{
"name": "load-module",
"author": "Lloyd Brookes <75pound@gmail.com>",
"version": "0.1.2",
"version": "0.1.3",
"description": "load-module",

@@ -6,0 +6,0 @@ "repository": "https://github.com/75lb/load-module.git",

@@ -36,20 +36,20 @@ 'use strict'

runner.test('loadModule: absolute path to lib', function () {
const modulePath = path.resolve(__dirname, '..', 'node_modules/command-line-args/lib/command-line-args.js')
const modulePath = path.resolve(__dirname, '..', 'node_modules/array-back/lib/array-back.js')
const module = loadModule(modulePath)
a.strictEqual(module.name, 'commandLineArgs')
a.strictEqual(module.name, 'arrayify')
})
runner.test('loadModule: full module name', function () {
const module = loadModule('command-line-args')
a.strictEqual(module.name, 'commandLineArgs')
const module = loadModule('array-back')
a.strictEqual(module.name, 'arrayify')
})
runner.test('loadModule: partial module name (module-prefix supplied)', function () {
const module = loadModule('line-args', { 'module-prefix': 'command-' })
a.strictEqual(module.name, 'commandLineArgs')
const module = loadModule('back', { 'module-prefix': 'array-' })
a.strictEqual(module.name, 'arrayify')
})
runner.test('loadModule: full module name (module-prefix supplied)', function () {
const module = loadModule('command-line-args', { 'module-prefix': 'command-' })
a.strictEqual(module.name, 'commandLineArgs')
const module = loadModule('back', { 'module-prefix': 'array-' })
a.strictEqual(module.name, 'arrayify')
})

@@ -56,0 +56,0 @@

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