title: type error is not a function
body: <p>I have  search function and this function is executing after click search button, my problem is when search button clicked, it shows an error saying <code>TypeError: KeyWord.searchStation is not a function</code>. Could anyone explain why getting this error in my snapped code?</p>
  
  <p>Code:</p>
  
  <pre><code>    search: function () {
  
          var self = this;
          var id = $("#in_id").val();
          var state_code = document.getElementById('sel_state').value;
          var type_code = document.getElementById('type_code').value;
  
  
          KeyWord.searchStation(state_code, type_code,
              function (data) {
                  $("#view_table").ViewTable('option', 'data', data);
                  console.log(data);
                  //location.reload();
              },
              function (error) {
                  jqXhrErr(error);
              },
              function () {
                  Metronic.unblockUI();
              });
      }
  
  var KeyWord = function () {
  
      var url_station = "api/station/Search";
      return {
          searchStation: function (state_code, type_code, done, fail, always) {
              var jqxhr = $.get(url_station, { state_code: state_code, type_code: type_code });
              return jqXhrHandler(jqxhr, done, fail, always);
          },
      }
  }();
  </code></pre>