Files
railwaysystem/RuoYi-Vue/ruoyi-ui/node_modules1/hyperformula/es/DependencyGraph/ProcessableValue.js
T
2026-09-10 15:40:10 +08:00

20 lines
466 B
JavaScript

/**
* @license
* Copyright (c) 2024 Handsoncode. All rights reserved.
*/
export class ProcessableValue {
constructor(rawValue, processFn) {
this.rawValue = rawValue;
this.processFn = processFn;
this.processedValue = null;
}
getProcessedValue() {
if (this.processedValue === null) {
this.processedValue = this.processFn(this.rawValue);
}
return this.processedValue;
}
markAsModified() {
this.processedValue = null;
}
}