Comparing version 0.2.1 to 0.3.0
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() { |
{ | ||
"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 @@ |
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
7827
148
117
11