Check plugin available when add Cordova plugin to Outsystems


I follow the documentation to add a Cordova plugin to Outsystems.
In the example with the ToastyPlugin, in the check plugin available method, the code is:
$parameters.IsAvailable = false;

if (typeof(window.plugins) !== 'undefined')

 {  $parameters.IsAvailable = typeof(window.plugins.toastyPlugin) !== 'undefined';}

The question is, how do we check plugin available if the plugin doesn't assign the plugin variable to window.plugins.
For example, how do we check plugin variable for this plugin below:

/* Export a new WikitudePlugin instance */

var wikitudePlugin = new WikitudePlugin();

module.exports = wikitudePlugin;

Maybe try checking if the wikitudePlugin variable remains undefined after you initialize it. If it is then the plugin probably isn't available.