Closed
Description
Version
latest
Platform
Subsystem
module
What steps will reproduce the bug?
// nodejs has a complicated module system called core module
// that allows you to not need to keep track of a single object
// returned from an init function and pass it to each function called
// in the module
//
// it creates what you would call classes
//
// or you can use exports only
exports.init = function() {
var o = {data_to_keep: 'asdf'};
// return the object
return o;
}
module.exports = class Junk {
// this is so you can remember every language's super cool module system
// see how powerful it is, you store an object automatically with all these extra
// "how to module" requirements in your code
// and you get to deal with functions and bind overwriting the this object that is the class!
// this is ran when the class is "instantiated" is the word used now
constructor() {
this.data_to_keep = 'asdf';
}
}
How often does it reproduce? Is there a required condition?
No response
What is the expected behavior?
You would expect the core module system not to exist.
What do you see instead?
It exists.
Additional information
Can you please clean this?
Metadata
Metadata
Assignees
Labels
No labels