Jyro 0.9.41

A minor update to Jyro renames the standard library function Abs() to Absolute() to create better naming consistency. The thinking is that if a function name is said out loud and makes sense, then that’s what the function should be called. That’s why we have Log(), Max(), and Min() but Absolute() and Average().

This release also vastly improves how ValidateRequired() works. Previously this function only checked for null, which is not particularly useful when we already have is null for that.

The new version now validates that all required fields are present and non-empty. So empty strings (““) and all-whitespace (“ “) now fail validation as well.

This shortens code like this:

if p.ticketId is not string or Trim(p.ticketId) == "" then
    fail "ticketId is required"
end
if p.assignedTo is not string or Trim(p.assignedTo) == "" then
    fail "assignedTo (staff ID) is required"
end
if p.performedBy is not string or Trim(p.performedBy) == "" then
    fail "performedBy (staff ID) is required"
end

To this:

var required = ValidateRequired(p, ["ticketId", "assignedTo", "performedBy"])
if not required.valid then
    fail Join(required.errors, "; ")
end

We feel the standard library surface is now stable and do not anticipate any further changes without community feedback.

Next
Next

Diff() function added