What are you looking for?

doc/module1.js

// This file describes the special 'module' variable of Euresys GenApi Script.
// It can be executed by running 'gentl script coaxlink://doc/module1.js'. It
// is also dynamically loaded by the coaxlink://doc/builtins.js script.

// 'module' is a special per-module variable. It cannot be declared with var.
// It always exists, and contains a few items:
console.log('Started execution of "' + module.filename + '"');
console.log('This script is located in directory "' + module.curdir + '"');

// Modules can export values via module.exports (which is initialized as an
// empty object):
module.exports = { description: 'Example of Euresys GenApi Script module'
                 , plus2: function(x) {
                     return x + 2;
                   }
                 , hello: function() {
                     console.log('Hello from ' + module.filename);
                   }
                 };

console.log('module.exports contains: ');
for (var e in module.exports) {
    console.log('- ' + e + ' (' + typeof module.exports[e] + ')');
}

console.log('Completed execution of ' + module.filename);