Globally registers an async function name to trigger automatic addition of the await keyword when the function is used. This API can be used during server startup to load and register global names.
Parameters
- (String) Function name
Example
if (!global.mycompany) global.mycompany = {}; if (!mycompany.utils) mycompany.utils = {}; mycompany.utils.usefulFunction = pjs.require("utils/usefulFunction.js"); pjs.registerAsyncName("mycompany.utils.usefulFunction");