function num2words( num, options ) {
	var parts;
	var opts;
	var err;

	if ( !isNumber( num ) ) {
		throw new TypeError( format( 'invalid argument. First argument must be a number. Value: `%s`.', num ) );
	}
	opts = {};
	if ( arguments.length > 1 ) {
		err = validate( opts, options );
		if ( err ) {
			throw err;
		}
	}
	if ( isInteger( num ) ) {
		switch ( opts.lang ) {
		case 'de':
			return int2wordsDE( num, '' );
		case 'en':
		default:
			return int2wordsEN( num, '' );
		}
	}
	if ( !isfinite( num ) ) {
		switch ( opts.lang ) {
		case 'de':
			return ( num < 0 ) ? 'minus unendlich' : 'unendlich';
		case 'en':
		default:
			return ( num < 0 ) ? 'negative infinity' : 'infinity';
		}
	}
	parts = num.toString().split( '.' );
	switch ( opts.lang ) {
	case 'de':
		return int2wordsDE( parts[ 0 ], '' ) + ' Komma ' + decimals( parts[ 1 ], int2wordsDE );
	case 'en':
	default:
		return int2wordsEN( parts[ 0 ], '' ) + ' point ' + decimals( parts[ 1 ], int2wordsEN );
	}
}
Converts a number to a word representation.

@param {number} num - number to convert
@param {Object} [options] - options
@param {string} [options.lang='en'] - language code
@throws {TypeError} must provide valid options
@returns {string} word representation of number

@example
var out = num2words( 12 );
// returns 'twelve'

@example
var out = num2words( 21.8 );
// returns 'twenty-one point eight'

@example
var out = num2words( 1234 );
// returns 'one thousand two hundred thirty-four'

@example
var out = num2words( 100381 );
// returns 'one hundred thousand three hundred eighty-one'