If you can edit "othercript" (no one else uses this script), you can simply wrap all the code inside the function and add it to the export. Example:
otherscript:
module.exports = function(){
};
Then use as:
var otherscript = require('otherscript');
var obj = otherscript();
source
share