Socket
Socket
Sign inDemoInstall

moder

Package Overview
Dependencies
Maintainers
1
Versions
12
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

moder - npm Package Compare versions

Comparing version 1.0.0 to 1.0.1

test/modules/case7/foo-bar.js

5

index.js

@@ -22,5 +22,6 @@ var fs = require('fs'),

var modulePath = path.join(dir, moduleName);
var exportName = camelcase(moduleName);
// lazy load
if (options.lazy) {
Object.defineProperty(modules, camelcase(moduleName), {
Object.defineProperty(modules, exportName, {
get: function() {

@@ -31,3 +32,3 @@ return options.init(require(modulePath));

} else {
modules[moduleName] = options.init(require(modulePath));
modules[exportName] = options.init(require(modulePath));
}

@@ -34,0 +35,0 @@ }

2

package.json
{
"name": "moder",
"version": "1.0.0",
"version": "1.0.1",
"description": "Module loader",

@@ -5,0 +5,0 @@ "license": "MIT",

@@ -51,2 +51,7 @@ var path = require('path'),

});
it('should convert module name to camel case without lazy evaluation', function() {
var case7 = moder(__dirname + '/modules/case7', {lazy: false});
assert.deepEqual(case7.fooBar, 'hello world');
});
});
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