client.functionManager.createFunction({
name: '$bigNumber',
type: "djs",
code: async (d) => {
const data = d.util.aoiFunc(d);
const numbers = data.inside.splits[0];
const nums = numbers.split(',').map(Number);
let bigN = nums[0];
for (var i = 1; i < nums.length; i++) {
if (nums[i] > bigN) {
bigN = nums[i];
}
}
data.result = bigN;
return {
code: d.util.setCode(data)
}
}
})
Example:
$bigNumber[1,10,20,5]
Output: 20