Skip to end of metadata
Go to start of metadata

You are viewing an old version of this page. View the current version.

Compare with Current View Page History

« Previous Version 2 Next »

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

  1. (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");
  • No labels