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.
@garfish/loader
Advanced tools
@garfish/loader
import { Loader } from '@garfish/loader';
const loader = new Loader({
maxSize: 10 * 1024 * 1024, // default number is "10 * 1024 * 1024"
});
// beforeLoad
loader.lifecycle.beforeLoad.add(({ url, config }) => {
// You can changed the request config
if (url.includes('xx')) {
url = url.replace('xx', '');
}
return { url, config };
});
// loaded
loader.lifecycle.loaded.add((data) => {
const { result, value } = data;
data.n = 1;
return data;
});
loader.lifecycle.loaded.add((data) => {
console.log(data.n); // 1
// The "data.value" will be cached this time.
// So, you can transform the request result.
return data;
});
loader.load('appName', 'https://xxx').then((result) => {
console.log(result); // 2
});
const loader = new Loader();
loader.clear('appName'); // Clear all cached resources under "appName"
loader.clear('appName', 'js'); // Clear all "js" cache resources under "appName"
loader.clearAll(); // Clear all cached resources
loader.clearAll('css'); // Clear all "css" cached resources
FAQs
loader module.
We found that @garfish/loader demonstrated a healthy version release cadence and project activity because the last version was released less than a year ago. It has 0 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
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.