class Service {}
export.module = new Service();
class Service {}
let service = () => {
let instance
function init() {
let opt = new Service()
return opt
}
return {
getInstance: function () {
if (!instance) {
instance = init()
}
return instance
}
}
}
module.export = service().getInstance()