module.exports = function( collection, count, options ){
	options = options || count;
	count = ( typeof count === 'number' ) ? count : 1;
	var result = '';
	for( var i = 0; i < collection.length; i++ ){
		result += options.fn( collection[collection.length-count+i] );
		if( i + 1 == count ) return result;
	}
};
module.exports = function( collection, count, options ){
	options = options || count;
	count = ( typeof count === 'number' ) ? count : 1;
	// if collection is an object, make it an array
	// otherwise we have no way to clip off the "end"
	if( !Array.isArray( collection ) ){
		var collection_array = [];
		for( var key in collection ){
			if( collection.hasOwnProperty( key ) ){
				collection_array.push( collection[key] );
			}
		}
		collection = collection_array;
	}
	var collection_last = collection.slice( -1 * count );
	var result = collection_last.reduce( function( previous, current ){
		return previous + options.fn( current );
	}, '' );
	return result;
};
convert object passed to last into array