static/js/display.js
/**
 * Calculate category and feature frequencies.
 * @function cacheFrequencies
 * @param {Object} mo - main object
 * @param {boolean} append - whether in append mode
 */
Calculate category and feature frequencies.
@function cacheFrequencies
@param {Object} mo - main object
@param {boolean} append - whether in append mode
Calculate category and feature frequencies . @function cacheFrequencies @param { Object } mo - main object @param { boolean } append - whether in append mode
function cacheFrequencies(mo, append) {
  const data = mo.data,
        types = mo.cols.types,
        freqs = mo.cache.freqs;
  for (let i = 0; i < types.length; i++) {
    if (i in freqs && append) continue;
    switch (types[i]) {
      case 'cat':
        freqs[i] = listCats(data[i]);
        break;
      case 'fea':
        freqs[i] = listFeas(data[i]);
        break;  
    }
  }
}
function cacheFrequencies ( mo , append ) { const data = mo . data , types = mo . cols . types , freqs = mo . cache . freqs ; for ( let i = 0 ; i < types . length ; i ++ ) { if ( i in freqs && append ) continue ; switch ( types [ i ] ) { case 'cat' : freqs [ i ] = listCats ( data [ i ] ) ; break ; case 'fea' : freqs [ i ] = listFeas ( data [ i ] ) ; break ; } } }
Calculate category and feature frequencies.
Calculate category and feature frequencies .