UNPKG

hyperformula

Version:

HyperFormula is a JavaScript engine for efficient processing of spreadsheet-like data and formulas

20 lines 469 B
/** * @license * Copyright (c) 2025 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; } }