Trying to use resemble.js within a server-side PhantomJS script is throwing undefined errors and no amount of logging will penetrate past {object Object}. Patterning after the phantom/examples/universe.js file, I tried turning the original resemble.js file:
(function (_this) {
  _this['resemble'] = function (fileData) {
    ...
  }
}(this));
into
exports.create = function () {
  (function (_this) {
    _this['resemble'] = function (fileData) {
      ...
    }
  }(this));
};
as well as
exports.create = function () {
  resemble = function (fileData) {
    ...
  }
};
First off, what the hell does that dangling (this) do?  Secondly, how can I log that object?  Finally, what is the proper way of wrapping up that file?
Thanks!
 
     
     
    