lib/abaaso.js
function ( obj ) {
		var values = {},
		    count  = 0,
		    nth    = 0,
		    mode   = [],
		    result;

		// Counting values
		array.each( obj, function ( i ) {
			if ( !isNaN( values[i] ) ) {
				values[i]++;
			}
			else {
				values[i] = 1;
			}
		});

		// Finding the highest occurring count
		count = array.max( array.cast( values ) );

		// Finding values that match the count
		utility.iterate( values, function ( v, k ) {
			if ( v === count ) {
				mode.push( number.parse( k ) );
			}
		});

		// Determining the result
		nth = mode.length;

		if ( nth > 0 ) {
			result = nth === 1 ? mode[0] : mode;
		}

		return result;
	}
function ( obj ) {
		var values = {},
		    count  = 0,
		    nth    = 0,
		    mode   = [],
		    result;

		// Counting values
		array.each( obj, function ( i ) {
			if ( !isNaN( values[i] ) ) {
				values[i]++;
			}
			else {
				values[i] = 1;
			}
		});

		// Finding the highest occurring count
		count = array.max( array.cast( values ) );

		// Finding values that match the count
		utility.iterate( values, function ( v, k ) {
			if ( v === count ) {
				mode.push( number.parse( k ) );
			}
		});

		// Determining the result
		nth = mode.length;

		if ( nth > 0 ) {
			result = nth === 1 ? mode[0] : mode;
		}

		return result;
	}
function ( obj ) { var values = { } , count = 0 , nth = 0 , mode = [ ] , result ; // Counting values array . each ( obj , function ( i ) { if ( ! isNaN ( values [ i ] ) ) { values [ i ] ++ ; } else { values [ i ] = 1 ; } } ) ; // Finding the highest occurring count count = array . max ( array . cast ( values ) ) ; // Finding values that match the count utility . iterate ( values , function ( v , k ) { if ( v === count ) { mode . push ( number . parse ( k ) ) ; } } ) ; // Determining the result nth = mode . length ; if ( nth > 0 ) { result = nth === 1 ? mode [ 0 ] : mode ; } return result ; }
Finds the mode value of an Array

@method mode
@param  {Array} obj Array to parse
@return {Mixed}     Mode value of the Array
Finds the mode value of an Array