Strange unexpected token on cordova

I have this code () {
var allContacts = {
      function onSuccess(contacts){
        contacts = _.sortBy(contacts, function(o) { return; })
      function onError(contactError){
      var options = new ContactFindOptions();
      options.multiple = true;
      var fields       = ["displayName", "name"];
      var contactos = navigator.contacts.find(fields, onSuccess, onError, options);
      Session.set("contactos", allContacts);
    contactos: function () {
    return Session.get("contactos");

That i am using to list all contacts in my phone.However,i keep getting unexpected token error on this line if(Meteor.isCordova){

I have checked the braces and all they all match and the problem squarely emanates from that line. Why am i getting the error?.