# This example does an AJAX lookup and is in CoffeeScript
  $('.typeahead').typeahead(
    # source can be a function
    source: (typeahead, query) ->
 # this function receives the typeahead object and the query string
  
    
      This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
      Learn more about bidirectional Unicode characters
    
  
  
    
  | STATE_ABBR_TO_NAME = { | |
| 'AL' => 'Alabama', | |
| 'AK' => 'Alaska', | |
| 'AS' => 'America Samoa', | |
| 'AZ' => 'Arizona', | |
| 'AR' => 'Arkansas', | |
| 'CA' => 'California', | |
| 'CO' => 'Colorado', | |
| 'CT' => 'Connecticut', | |
| 'DE' => 'Delaware', |