UNPKG

hyperformula

Version:

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

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