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

module-keys

Package Overview
Dependencies
Maintainers
1
Versions
14
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

module-keys - npm Package Compare versions

Comparing version 2.0.0 to 2.0.1

101

cjs/index.js

@@ -72,61 +72,66 @@ /**

delete module.exports;
delete module.loaded;
defineProperties(
module, {
exports: {
enumerable: true,
configurable: true,
get() {
return exports;
},
set(newExports) {
exports = newExports;
if (newExports &&
(typeof newExports === 'object' ||
typeof newExports === 'function')) {
if (!apply(hasOwnProperty, exports, [ 'publicKey' ])) {
try {
module.exports.publicKey = publicKey;
} catch (exc) {
// Oh well. We tried our best.
}
}
if (!apply(hasOwnProperty, exports, [ publicKeySymbol ])) {
try {
module.exports[publicKeySymbol] = publicKey;
} catch (exc) {
// Oh well. We tried our best.
}
}
}
},
const properties = {
exports: {
enumerable: true,
configurable: true,
get() {
return exports;
},
loaded: {
enumerable: true,
configurable: true,
get() {
return loaded;
},
set(newLoaded) {
loaded = newLoaded;
if (loaded === true) {
// Stop virtualizing
set(newExports) {
exports = newExports;
if (newExports &&
(typeof newExports === 'object' ||
typeof newExports === 'function')) {
if (!apply(hasOwnProperty, exports, [ 'publicKey' ])) {
try {
delete module.exports;
module.exports = exports;
module.exports.publicKey = publicKey;
} catch (exc) {
// Best effort.
// Oh well. We tried our best.
}
}
if (!apply(hasOwnProperty, exports, [ publicKeySymbol ])) {
try {
delete module.loaded;
module.loaded = loaded;
module.exports[publicKeySymbol] = publicKey;
} catch (exc) {
// Best effort.
// Oh well. We tried our best.
}
}
},
}
},
});
},
};
try {
delete module.loaded;
properties.loaded = {
enumerable: true,
configurable: true,
get() {
return loaded;
},
set(newLoaded) {
loaded = newLoaded;
if (loaded === true) {
// Stop virtualizing
try {
delete module.exports;
module.exports = exports;
} catch (exc) {
// Best effort.
}
try {
delete module.loaded;
module.loaded = loaded;
} catch (exc) {
// Best effort.
}
}
},
};
} catch (exc) {
// Webpack locks this down. Good job, webpack!
}
defineProperties(module, properties);
}
module.exports.polyfill = polyfill;
{
"name": "module-keys",
"description": "Module identity as a basis for privilege separation for ESM & CommonJS modules",
"version": "2.0.0",
"version": "2.0.1",
"keywords": [

@@ -6,0 +6,0 @@ "design-patterns",

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