function validate( opts, options ) {
	if ( !isObject( options ) ) {
		return new TypeError( format( 'invalid argument. Options argument must be an object. Value: `%s`.', options ) );
	}
	if ( hasOwnProp( options, 'width' ) ) {
		opts.width = options.width;
		if ( !isPositiveInteger( opts.width ) ) {
			return new TypeError( format( 'invalid option. `%s` option must be a positive integer. Option: `%s`.', 'width', opts.width ) );
		}
	}
	if ( hasOwnProp( options, 'ex' ) ) {
		opts.ex = options.ex;
		if ( !isPositiveInteger( opts.ex ) ) {
			return new TypeError( format( 'invalid option. `%s` option must be a positive integer. Option: `%s`.', 'ex', opts.ex ) );
		}
	}
	if ( hasOwnProp( options, 'inline' ) ) {
		opts.inline = options.inline;
		if ( !isBoolean( opts.inline ) ) {
			return new TypeError( format( 'invalid option. `%s` option must be a boolean. Option: `%s`.', 'inline', opts.inline ) );
		}
	}
	if ( hasOwnProp( options, 'linebreaks' ) ) {
		opts.linebreaks = options.linebreaks;
		if ( !isBoolean( opts.linebreaks ) ) {
			return new TypeError( format( 'invalid option. `%s` option must be a boolean. Option: `%s`.', 'linebreaks', opts.linebreaks ) );
		}
	}
	return null;
}
Validates function options.

@private
@param {Object} opts - destination object
@param {Options} options - options to validate
@param {PositiveInteger} [options.width] - container width in `ex`
@param {PositiveInteger} [options.ex] - `ex` size in pixels
@param {boolean} [options.inline] - specifies whether to format the input string as an inline equation
@param {boolean} [options.linebreaks] - enable linebreaking
@returns {(Error|null)} error object or null

@example
var opts = {};
var options = {
    'inline': true
};
var err = validate( opts, options );
if ( err ) {
    throw err;
}