
Security News
Package Maintainers Call for Improvements to GitHub’s New npm Security Plan
Maintainers back GitHub’s npm security overhaul but raise concerns about CI/CD workflows, enterprise support, and token management.
An (admittedly naïve) node module (un|re)loader/refreshener.
module
(String) - the module to unloadCompletely unload a node module from the cache. Returns true
if the module was present in the cache, false
if not.
var minimist = require('minimist'),
freshy = require('freshy');
freshy.unload('minimist'); // true
module
(String) - the module to reloadCompletely unload and reload a given module in place, leaving the new copy in the cache. Returns reloaded module.
var minimist = require('minimist'),
freshy = require('freshy');
var fresh = freshy.reload('minimist');
console.log(minimist === fresh); // false
module
(String) - the module for which to fetch a fresh instancecallback
(function, optional) - A function called while the fresh module is the one in cacheGet a fresh instance of a module without disturbing the cached copy. Returns the fresh module instance.
var minimist = require('minimist'),
freshy = require('freshy');
var fresh = freshy.freshy('minimist');
console.log(minimist === fresh); // false
var mini = require('minimist');
console.log(minimist === mini); // true
And to get a consistent require of modules that require each other, you can use the callback style:
var minimist = require('minimist'),
freshy = require('freshy');
var alsofresh;
var fresh = freshy.freshy('minimist', function (fresh) {
alsofresh = require('minimist');
console.log(fresh === alsofresh); // true
});
console.log(minimist === fresh); // false
console.log(fresh == alsofresh); // true
var mini = require('minimist');
console.log(minimist === mini); // true
This is useful for modules that alter other modules you require. dustjs-linkedin
and dustjs-helpers
is an example of this.
FAQs
A node module (un|re)loader.
The npm package freshy receives a total of 938 weekly downloads. As such, freshy popularity was classified as not popular.
We found that freshy demonstrated a not healthy version release cadence and project activity because the last version was released a year ago. It has 2 open source maintainers 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
Maintainers back GitHub’s npm security overhaul but raise concerns about CI/CD workflows, enterprise support, and token management.
Product
Socket Firewall is a free tool that blocks malicious packages at install time, giving developers proactive protection against rising supply chain attacks.
Research
Socket uncovers malicious Rust crates impersonating fast_log to steal Solana and Ethereum wallet keys from source code.