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 0.1.0 to 0.1.1

13

index.js

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

var modules = {};
options = merge(options || {}, {
lazy: true,
init: function(mod){ return mod; }
});
options = options || {};
if (typeof options === 'function') {
options = {init: options};
} else {
options = merge(options, {
lazy: true,
init: function(mod){ return mod; }
});
}

@@ -12,0 +17,0 @@ fs.readdirSync(dir).forEach(function(filename) {

{
"name": "moder",
"version": "0.1.0",
"version": "0.1.1",
"description": "Module loader",

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

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

it('should support initialization', function() {
var case4 = moder(__dirname + '/modules/case4', {init: function(mod) {
var case4 = moder(__dirname + '/modules/case4', function(mod) {
return 'anothername';
}});
});
assert.equal(case4.mod, 'anothername');
});
});
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