12 lines
217 B
JavaScript
12 lines
217 B
JavaScript
class BaseNode {
|
|
constructor(name, graph) {
|
|
this.name = name;
|
|
this.graph = graph;
|
|
}
|
|
|
|
evaluate(input) {
|
|
throw new Error('evaluate() must be implemented by subclass');
|
|
}
|
|
}
|
|
|
|
module.exports = BaseNode; |