I see that there is a JavaScript libraries tool and I guess that we can call a function from the library and pass it arguments but how is this done from the script? I cannot see it in the documentation.
If you are talking about the new library included in NeoLoad 7.1 it is documented here
Otherwise you can drag and drop a Javascript action in your user path and call your function from that Javascript. You can either define your function in that JS and/or use Java code. For more details you can look at the NeoLoad documentation.
Ah, it appears that the boilerplate in the javascript example is exactly what i need but had previously ignored and deleted in the past.
// Do some computation using the methods
// you defined in the JS Library
var computedValue = myLibraryFunction(myVar);