Security News
Fluent Assertions Faces Backlash After Abandoning Open Source Licensing
Fluent Assertions is facing backlash after dropping the Apache license for a commercial model, leaving users blindsided and questioning contributor rights.
disrequire
Advanced tools
Same as qmock.unrequire
, but available standalone.
This package exports a function to undo the side-effects of a require()
.
All cached copies of an external nodejs module loaded with require
will be discarded.
Built-in modules such as http
do not have separate cached copies, and are not unloaded.
const disrequire = require('disrequire');
disrequire('config');
Unload the named package from all require
caches. The package is removed from
require.cache
and from every module.children[]
in which it occurs. Built-in modules
like http
are not unloaded.
const disrequire = require('disrequire');
disrequire('config');
Shallow unload a single copy of the named package from the require
caches. The package is
removed from require.cache
and from the module that loaded it, ie
require.cache[require.resove(packageName)].parent.children[]
.
If it is known that only one module loaded the package, it is much faster to not have to walk the module tree searching for other locations.
const disrequire = require('disrequire'); // now you see it
disrequire.quick('disrequire'); // now you dont
stack
disrequire.quick()
shallow unloadresolveOrSelv
qmock
qmock
- various useful mocks and stubs,
including mocks for node system functionsFAQs
undo a require
The npm package disrequire receives a total of 68 weekly downloads. As such, disrequire popularity was classified as not popular.
We found that disrequire demonstrated a not healthy version release cadence and project activity because the last version was released a year ago. It has 1 open source maintainer collaborating on the project.
Did you know?
Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.
Security News
Fluent Assertions is facing backlash after dropping the Apache license for a commercial model, leaving users blindsided and questioning contributor rights.
Research
Security News
Socket researchers uncover the risks of a malicious Python package targeting Discord developers.
Security News
The UK is proposing a bold ban on ransomware payments by public entities to disrupt cybercrime, protect critical services, and lead global cybersecurity efforts.