hyperformula
Version:
HyperFormula is a JavaScript engine for efficient processing of spreadsheet-like data and formulas
24 lines (22 loc) • 584 B
JavaScript
;
exports.__esModule = true;
exports.IsOddPlugin = void 0;
var _FunctionPlugin = require("./FunctionPlugin");
/**
* @license
* Copyright (c) 2025 Handsoncode. All rights reserved.
*/
class IsOddPlugin extends _FunctionPlugin.FunctionPlugin {
isodd(ast, state) {
return this.runFunction(ast.args, state, this.metadata('ISODD'), val => val % 2 === 1);
}
}
exports.IsOddPlugin = IsOddPlugin;
IsOddPlugin.implementedFunctions = {
'ISODD': {
method: 'isodd',
parameters: [{
argumentType: _FunctionPlugin.FunctionArgumentType.NUMBER
}]
}
};