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

loader.js

Package Overview
Dependencies
Maintainers
1
Versions
30
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

loader.js - npm Package Compare versions

Comparing version 3.1.0 to 3.2.0

19

loader.js

@@ -70,2 +70,10 @@ var define, requireModule, require, requirejs;

function Alias(path) {
this.name = path;
}
define.alias = function(path) {
return new Alias(path);
};
function reify(mod, name, seen) {

@@ -108,8 +116,15 @@ var deps = mod.deps;

function missingModule(name) {
throw new Error('Could not find module ' + name);
}
requirejs = require = requireModule = function(name) {
var mod = registry[name];
if (!mod) {
throw new Error('Could not find module ' + name);
if (mod && mod.callback instanceof Alias) {
mod = registry[mod.callback.name];
}
if (!mod) { missingModule(name); }
if (mod.state !== FAILED &&

@@ -116,0 +131,0 @@ seen.hasOwnProperty(name)) {

2

package.json
{
"name": "loader.js",
"version": "3.1.0",
"version": "3.2.0",
"description": "loader.js =========",

@@ -5,0 +5,0 @@ "main": "loader.js",

@@ -342,3 +342,2 @@ var keys;

define('foo/b', ['module', 'exports', 'require'], function(module, exports, require) {

@@ -354,1 +353,15 @@ module.exports = require('./c');

});
test('foo foo/index are the same thing', function() {
define('foo/index', [] , function() {
return { 'default': 'hi' };
});
define('foo', [ ], define.alias('foo/index'));
define('bar', ['foo', 'foo/index'] , function(foo, fooIndex) {
deepEqual(foo, fooIndex);
});
deepEqual(require('foo'), require('foo/index'));
});
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