
Company News
Socket Joins New OpenJS Program to Fund Node.js Security Work
Socket is joining the OpenJS Security Stewardship Program to fund Node.js vulnerability research, maintainer remediation, and security releases.
NodeJS module automatic on-demand lazy loader(NodeJS模块自动按需懒加载器)
npm install noader
/*
module a
/app/module/a.js
*/
module.exports = {
name: 'test',
fun: function(str){
return str;
},
cls: class {
constructor(str) {
this.str = str;
}
fun() {
return this.str;
}
}
}
/*
module b
/app/b.js
*/
module.exports = class {
constructor(str) {
this.str = str;
}
fun() {
return this.str;
}
}
/*
module test
/test.js
*/
const noader = require('noader');
const loader = noader();
console.log(loader.app.module.a.name); // test
console.log(loader.app.module.a.fun('test1')); // test1
console.log(new loader.app.module.a.cls('test2').fun()); // test2
//if the module is a class, the loader will auto new a instance
console.log(loader.app.b); // class function
console.log(loader.app.b.fun()); // undefined
//the args will be used at new
const loader2 = noader(__dirname, 'test3');
console.log(loader2.app.b.fun()); // test3
console.log(loader2.app.b.$class); // true
console.log(loader2.app.b.$instance); // class instance
console.log(loader2.app.b.$path); // /workspace/test/app/b/
FAQs
NodeJS module automatic on-demand lazy loader
The npm package noader receives a total of 16 weekly downloads. As such, noader popularity was classified as not popular.
We found that noader 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.

Company News
Socket is joining the OpenJS Security Stewardship Program to fund Node.js vulnerability research, maintainer remediation, and security releases.

Security News
Two compromised GitHub Actions were re-enabled with malicious tags intact, exposing thousands of downstream repositories to Mini Shai-Hulud.

Research
/Security News
A malicious Firefox extension fetches its payload after installation to evade detection, steal Google session cookies, and automate account takeover.