UNPKG

hyperformula

Version:

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

26 lines 588 B
/** * @license * Copyright (c) 2025 Handsoncode. All rights reserved. */ import { FunctionArgumentType, FunctionPlugin } from "./FunctionPlugin.mjs"; export class ExpPlugin extends FunctionPlugin { /** * Corresponds to EXP(value) * * Calculates the exponent for basis e * * @param ast * @param state */ exp(ast, state) { return this.runFunction(ast.args, state, this.metadata('EXP'), Math.exp); } } ExpPlugin.implementedFunctions = { 'EXP': { method: 'exp', parameters: [{ argumentType: FunctionArgumentType.NUMBER }] } };