title: Does Select2 support conditional/function option values?
body: <p>Maybe my Google-Fu is off today but I just can't for the life of me figure out whether or not Select2 4.0.2 supports functions as the values for options. Looking like a "no" from my fumbling around but worth a try, right?</p>
  
  <p>Here's what I have which does not work:</p>
  
  <p><div class="snippet" data-lang="js" data-hide="false" data-console="false" data-babel="false">
  <div class="snippet-code">
  <pre class="snippet-code-js lang-js prettyprint-override"><code>$(function() {
    $('select').select2({
      allowClear: true,
      minimumResultsForSearch: function() {
        return $(this).hasClass('taggable') ? 0 : 8;
      },
      tags: function() {
        $(this).hasClass('taggable');
      },
      width: "100px"
    });
  });</code></pre>
  <pre class="snippet-code-html lang-html prettyprint-override"><code>&lt;link href="https://cdnjs.cloudflare.com/ajax/libs/select2/4.0.2/css/select2.min.css" rel="stylesheet" /&gt;
  &lt;script src="https://cdnjs.cloudflare.com/ajax/libs/jquery/2.1.1/jquery.min.js"&gt;&lt;/script&gt;
  &lt;script src="https://cdnjs.cloudflare.com/ajax/libs/select2/4.0.2/js/select2.min.js"&gt;&lt;/script&gt;
  
  &lt;select&gt;
    &lt;option&gt;One&lt;/option&gt;
    &lt;option&gt;Two&lt;/option&gt;
    &lt;option&gt;Three&lt;/option&gt;
  &lt;/select&gt;
  &lt;select class="taggable"&gt;
    &lt;option&gt;One&lt;/option&gt;
    &lt;option&gt;Two&lt;/option&gt;
    &lt;option&gt;Three&lt;/option&gt;
  &lt;/select&gt;</code></pre>
  </div>
  </div>
  </p>
  
  <p>Does Select2 support functions as the value of options? If so, what stupidly simple thing am I doing wrong?</p>
  
  <p>I have seen similar questions asking how to change the options on-the-fly which isn't <em>exactly</em> what I'm looking for - I just don't want to repeat myself if I can help it - so fingers crossed this isn't a duplicate.</p>