All files index.js

100% Statements 9/9
100% Branches 2/2
100% Functions 4/4
100% Lines 7/7
1 2 3 4 5 6 7 8 9 10 11 12 13 141x   2x 2x 11x 11x         65x 2x    
module.exports = {
  countNum: (str) => {
    const e = [];
    const a = [...new Set(str.replace(/\s+/g, '').split(''))].map((row) => {
      const reg = new RegExp(row, 'g');
      return {
        key: row,
        value: str.match(reg).length
      };
    });
    a.map(row => row.value === Math.max(...a.map(row => row.value)) ? e.push(row.key) : null);
    return e;
  },
}