New Case Study:See how Anthropic automated 95% of dependency reviews with Socket.Learn More
Socket
Sign inDemoInstall
Socket

custom-require

Package Overview
Dependencies
Maintainers
1
Versions
32
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

custom-require - npm Package Compare versions

Comparing version 0.1.2 to 0.1.3

3

dist/CustomRequire.d.ts

@@ -13,5 +13,6 @@ /// <reference types="node" />

callback: (module: CustomNodeModule) => void;
unrequirecallback: (moduleList: CustomNodeModule[]) => void;
called: string[];
attachedModules: CustomNodeModule[];
constructor(callback: (module: CustomNodeModule) => void);
constructor(requirecallback: (module: CustomNodeModule) => void, unrequirecallback?: (moduleList: CustomNodeModule[]) => void);
require(id: string, callerModule?: CustomNodeModule): any;

@@ -18,0 +19,0 @@ unrequire(id: string, callerModule?: CustomNodeModule, invalidateCache?: boolean): CustomNodeModule[];

@@ -5,6 +5,7 @@ "use strict";

var CustomRequire = (function () {
function CustomRequire(callback) {
function CustomRequire(requirecallback, unrequirecallback) {
this.called = [];
this.attachedModules = [];
this.callback = callback;
this.callback = requirecallback;
this.unrequirecallback = unrequirecallback;
}

@@ -32,2 +33,5 @@ CustomRequire.prototype.require = function (id, callerModule) {

}
if (this.unrequirecallback) {
this.unrequirecallback(list);
}
return list;

@@ -34,0 +38,0 @@ };

@@ -34,3 +34,3 @@ {

},
"version": "0.1.2",
"version": "0.1.3",
"dependencies": {

@@ -37,0 +37,0 @@ "callsite": "^1.0.0"

Sorry, the diff of this file is not supported yet

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