
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 i noader
├── test
│ ├── app
│ │ └── module
│ │ └── a.js
│ ├── app2
│ │ └── b.js
│ └── index.js
module.exports = {
prop: 'prop a',
fun: function(str){
this.prop = str;
return this.prop;
}
}
module.exports = class {
constructor(str) {
this.str = str;
}
fun(str) {
this.str = str;
return this.str;
}
self() {
return this;
}
}
const noader = require('noader');
const loader = noader();
console.log(loader.app.module.a); // Object: a
console.log(loader.app.module.a.prop); // String: 'prop a'
console.log(loader.app.module.a.fun('test1')); // String: 'test1'
console.log(loader.app2.b); // Class: b
console.log(loader.app2.b === loader.app2.b); // Boolean: true
console.log(loader.app2.b.str); // Undefined
console.log(loader.app2.b.fun('test2')); // String: 'test2'
console.log(loader.app2.b.$map.instance); // Class: b instance
console.log(loader.app2.b.$map.instance === loader.app2.b.$map.instance); // Boolean: true
console.log(loader.app2.b.$map.is_class); // Boolean: true
const c = new loader.app2.b('test3');
console.log(c); // Class b instance: c
console.log(c.str); // String: 'test3'
console.log('---------------------------------');
const loader2 = noader('../', 'test4');
console.log(loader2.test.app.module.a); // Object: a
console.log(loader2.test.app2.b); // Class: b
console.log(loader2.test.app2.b.str); // String: 'test4'
console.log('---------------------------------');
console.log(loader2.test.app2.b === loader.app2.b); // Boolean: false (because the class is a proxy object)
console.log(loader2.test.app2.b.$map.instance === loader.app2.b.$map.instance); // Boolean: false
console.log(loader2.test.app2.b.$map.path); // the absoulte path of b
{ prop: 'prop a', fun: [Function: fun] }
prop a
test1
[Function]
true
undefined
test2
{ str: 'test2' }
true
true
{ str: 'test3' }
test3
---------------------------------
{ prop: 'test1', fun: [Function: fun] }
[Function]
test4
---------------------------------
false
false
D:\wwwroot\noader\test/app2/b/
npm test
FAQs
NodeJS module automatic on-demand lazy loader
The npm package noader receives a total of 1 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.