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