hyperformula
Version:
HyperFormula is a JavaScript engine for efficient processing of spreadsheet-like data and formulas
20 lines • 522 B
JavaScript
/**
* @license
* Copyright (c) 2025 Handsoncode. All rights reserved.
*/
import { FunctionArgumentType, FunctionPlugin } from "./FunctionPlugin.mjs";
export class PowerPlugin extends FunctionPlugin {
power(ast, state) {
return this.runFunction(ast.args, state, this.metadata('POWER'), Math.pow);
}
}
PowerPlugin.implementedFunctions = {
'POWER': {
method: 'power',
parameters: [{
argumentType: FunctionArgumentType.NUMBER
}, {
argumentType: FunctionArgumentType.NUMBER
}]
}
};