Remove unused dep + file
This commit is contained in:
parent
8839aa1e43
commit
14199d6d10
|
@ -1,35 +0,0 @@
|
|||
const Symbol = require('es6-symbol');
|
||||
|
||||
class Singleton {
|
||||
constructor() {
|
||||
const Class = this.constructor;
|
||||
if (!Class[this.singleton]) {
|
||||
Class[this.singleton] = this;
|
||||
}
|
||||
|
||||
return Class[this.singleton];
|
||||
}
|
||||
|
||||
static get instance() {
|
||||
if (!this[this.singleton]) {
|
||||
this[this.singleton] = new this();
|
||||
}
|
||||
|
||||
return this[this.singleton];
|
||||
}
|
||||
|
||||
static set instance(instance) {
|
||||
this[this.singleton] = instance;
|
||||
return this[this.singleton];
|
||||
}
|
||||
|
||||
static get singleton() {
|
||||
return Symbol(this.namespace);
|
||||
}
|
||||
|
||||
static reset() {
|
||||
delete this[this.singleton];
|
||||
}
|
||||
}
|
||||
|
||||
export default Singleton;
|
|
@ -81,7 +81,6 @@
|
|||
"wml": "0.0.82"
|
||||
},
|
||||
"dependencies": {
|
||||
"bows": "^1.6.0",
|
||||
"es6-symbol": "^3.1.0"
|
||||
"bows": "^1.6.0"
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue