INNER CODE UNIT · JavaScript

fmt

ucscGenomeBrowser/kent · src/hg/utils/registryPages/index.js:102

  function fmt(n){ return n.toLocaleString('en-US'); }
  function run(){
    var v = q.value.trim().toLowerCase();
    var view = document.body.getAttribute('data-view');
    var noun = view === 'az' ? ' names' : ' rows';
    var total = chips[view].length;
    hide();
    if (!v){
      document.body.classList.remove('filtering','noresult');
      cnt.textContent = fmt(total) + noun;
      return;
    }
    document.body.classList.add('filtering');
    var shown = 0;
    Object.keys(views).forEach(function(k){
      var n = 0;
      for (var i=0;i<chips[k].length;i++){
        var hit = chips[k][i].getAttribute('data-n').indexOf(v) !== -1;

View source record →

📰 Research Paper
Loading…
⏳ Fetching content…