media/jquery/tablesorter-master/js/parsers/parser-metric.js
Consider simplifying this complex logical expression. Open
Open
if ( !regex ) {
// stored values
unit = ( $t.attr('data-metric-name') || base ).split( '|' );
nameLong = $t.attr( 'data-metric-name-full' ) || '';
nameAbbr = $t.attr( 'data-metric-name-abbr' ) || '';
Function format
has 31 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
format: function(txt, table, cell, cellIndex) {
var unit, isBinary, nameLong, nameAbbr,
// default base unit name
base = 'm|meter',
// process number here to get a numerical format (us or eu)