I have a class that looks like this:
class Foo {
constructor(arg1, arg2) {
// ...
this._some_obj = new SomeObj({
param1: arg1,
param2: arg2
});
}
// ...
}
module.exports = Foo;
Now I want to do the same thing but with _some_obj
shared between all instances of the class.
After searching around I'm unclear as to the correct way to do this in ES6.