title: Understanding Bloodhound.tokenizers.obj.whitespace
body: <p>All, I was trying to apply <code>Twitter typeahead</code> and <code>Bloodhound</code> into my project based on some working sample, But I can't understand below code .</p>
  
  <pre><code>datumTokenizer: Bloodhound.tokenizers.obj.whitespace('songs'),
  queryTokenizer: Bloodhound.tokenizers.whitespace,
  </code></pre>
  
  <p>The original code looks like below.</p>
  
  <pre><code>var songlist = new Bloodhound({
                  datumTokenizer: Bloodhound.tokenizers.obj.whitespace('songs'),
                  queryTokenizer: Bloodhound.tokenizers.whitespace,
                  limit: 10,
                  remote: '/api/demo/GetSongs?searchTterm=%QUERY'
  
              });
  </code></pre>
  
  <p>The <a href="https://github.com/twitter/typeahead.js/blob/master/doc/bloodhound.md#options" rel="noreferrer">official document</a> just said :</p>
  
  <blockquote>
    <p>datumTokenizer – A function with the signature (datum) that transforms
    a datum into an array of string tokens. Required.</p>
    
    <p>queryTokenizer – A function with the signature (query) that transforms
    a query into an array of string tokens. Required.</p>
  </blockquote>
  
  <p>What does it mean ? Could someone please help to tell me more about it so that I have better understanding?</p>