Hi,
I tried this in app.js:
! function() { var Obj = require('controls/test').createFoo(); Obj.log(); }();and in test.js:
var Foo = function() { return this; }; Foo.prototype = { log : function() { console.log('test'); } }; exports.createFoo = function() { return new Foo(); };It is a fork of this page. But it doesn't work in Titanium world. Any ideas?