code: function (num) {
        switch (typeof num) {
          case 'number':
            return num;
          case 'string':
            if (!isNaN(num)) {
              return num.indexOf('.') > -1 ? parseFloat(num) : parseInt(num, 10);
            }
        }
  
        return num;
      }
docs: get number
  @param  {Number|String} num
  @returns {Number}