1
0
Fork 0
mirror of https://github.com/koalyptus/TableFilter.git synced 2024-05-17 22:06:41 +02:00
TableFilter/src/modules/feature.js
2015-11-21 18:31:32 +11:00

38 lines
614 B
JavaScript

const NOTIMPLEMENTED = 'Not implemented.';
export class Feature {
constructor(tf, feature) {
this.tf = tf;
this.feature = feature;
this.enabled = tf[feature];
this.config = tf.config();
this.initialized = false;
}
init() {
throw new Error(NOTIMPLEMENTED);
}
reset() {
this.enable();
this.init();
}
destroy() {
throw new Error(NOTIMPLEMENTED);
}
enable() {
this.enabled = true;
}
disable() {
this.enabled = false;
}
isEnabled() {
return this.enabled;
}
}