lib/index.js
function cmin( arr ) {
	if ( !Array.isArray( arr ) ) {
		throw new TypeError( 'cmin()::invalid input argument. Must provide an array.' );
	}
	var len = arr.length,
		v = new Array( len ),
		min;

	min = arr[ 0 ];
	v[ 0 ] = min;
	for ( var i = 1; i < len; i++ ) {
		if ( arr[ i ] < min ) {
			min = arr[ i ];
		}
		v[ i ] = min;
	}
	return v;
}
function cmin( arr ) {
	if ( !Array.isArray( arr ) ) {
		throw new TypeError( 'cmin()::invalid input argument. Must provide an array.' );
	}
	var len = arr.length,
		v = new Array( len ),
		min;

	min = arr[ 0 ];
	v[ 0 ] = min;
	for ( var i = 1; i < len; i++ ) {
		if ( arr[ i ] < min ) {
			min = arr[ i ];
		}
		v[ i ] = min;
	}
	return v;
}
FUNCTION: cmin( arr )
Computes the cumulative minimum of a numeric array.

@param {Array} arr - numeric array
@returns {Array} cumulative min