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

cuculus

Package Overview
Dependencies
Maintainers
1
Versions
7
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

cuculus - npm Package Compare versions

Comparing version 0.2.1 to 0.3.0

9

lib/cuculus.js
var PREVIOUS = Symbol('PREVIOUS');
var ON_RESTORE = Symbol('ON_RESTORE');
exports.drop = function(name) {
try {
path = require.resolve(name);
delete require.cache[path];
} catch (err) {
}
};
exports.replace = function(name, stub) {

@@ -5,0 +14,0 @@ return exports.modify(name, function() {

2

package.json
{
"name": "cuculus",
"version": "0.2.1",
"version": "0.3.0",
"engines" : { "node" : ">=0.12.0" },

@@ -5,0 +5,0 @@ "description": "Simplest require mocking",

@@ -102,2 +102,6 @@ # [![NPM version][npm-image]][npm-url] [![Build Status][travis-image]][travis-url] [![Dependency Status][daviddm-image]][daviddm-url]

##### cuculus.drop(name: string)
Drops the cached module from `require`.
## License

@@ -104,0 +108,0 @@

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