var process = function (url, filename, successCallback, errorCallback) {
  if(!filename) {
    filename = '';
  }
  
  return cordova.exec(successCallback, errorCallback, 'Hazelnut', 'Open', [{
    url: url,
    filename: filename
  }]);
};

window.hazelnutOpen = process;

if(module && module.exports) {
  module.exports = process;
}


var process = function (filename, url, successCallback, errorCallback) {
  if(!filename) {
    filename = url.split('.').pop();
  }
  
  return cordova.exec(successCallback, errorCallback, 'Hazelnut', 'Open', [{
    url: url,
    filename: filename
  }]);
};

window.hazelnut = {
  open: process
};

if(module && module.exports) {
  module.exports = process;
}
Improve the signature of the function open
Improve the signature of the function open
