Super basic code block help

I’m trying to use the code node to incorporate this library into my workflow. its a spreadsheet-like formula function

I’d love to be able to call any formula and have it return the result - is this doable?
I have 0 typescript knowledge so I’m running into a bit of a roadblock. I’ve already included formulajs as a dependency and tried this:

import * as formulajs from ‘formulajs’;
export const code = async (inputs) => {

// Dynamically execute the formula
let result = eval(formulajs.{inputs.formula});
return result;

};
but its not working - any ideas?

This topic was automatically closed 15 days after the last reply. New replies are no longer allowed.