UNPKG

hyperformula

Version:

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

18 lines 480 B
/** * @license * Copyright (c) 2025 Handsoncode. All rights reserved. */ import { FunctionArgumentType, FunctionPlugin } from "./FunctionPlugin.mjs"; export class IsEvenPlugin extends FunctionPlugin { iseven(ast, state) { return this.runFunction(ast.args, state, this.metadata('ISEVEN'), val => val % 2 === 0); } } IsEvenPlugin.implementedFunctions = { 'ISEVEN': { method: 'iseven', parameters: [{ argumentType: FunctionArgumentType.NUMBER }] } };