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

normalize-require

Package Overview
Dependencies
Maintainers
1
Versions
4
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

normalize-require - npm Package Compare versions

Comparing version 1.0.1 to 1.1.0

require.js

40

index.js

@@ -1,40 +0,2 @@

/**
* Require the module at `name`.
*
* @param {String} name
* @return {Object} exports
* @api public
*/
function require(name) {
var module = require.modules[name];
if (!module) throw new Error('failed to require "' + name + '"');
var definition = module.definition;
if (definition) {
definition.call(this, module.exports = {}, module);
delete module.definition;
}
return module.exports;
}
/**
* Registered modules.
*/
require.modules = {};
/**
* Register module at `name` with callback `definition`.
*
* @param {String} name
* @param {Function} definition
* @api private
*/
require.register = function (name, definition) {
require.modules[name] = {
definition: definition
};
};
module.exports = require('fs').readFileSync(require.resolve('./require.js'), 'utf8')
{
"name": "normalize-require",
"description": "nlz's require implementation",
"version": "1.0.1",
"version": "1.1.0",
"author": {

@@ -6,0 +6,0 @@ "name": "Jonathan Ong",

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