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, 'cwd' ) ) {
		if ( !isString( options.cwd ) ) {
			return new TypeError( format( 'invalid option. `%s` option must be a string. Option: `%s`.', 'cwd', options.cwd ) );
		}
		opts.cwd = options.cwd;
	}
	if ( hasOwnProp( options, 'quiet' ) ) {
		if ( !isBoolean( options.quiet ) ) {
			return new TypeError( format( 'invalid option. `%s` option must be a boolean. Option: `%s`.', 'quiet', options.quiet ) );
		}
		opts.quiet = options.quiet;
	}
	if ( hasOwnProp( options, 'silent' ) ) {
		if ( !isBoolean( options.silent ) ) {
			return new TypeError( format( 'invalid option. `%s` option must be a boolean. Option: `%s`.', 'silent', options.silent ) );
		}
		opts.silent = options.silent;
	}
	if ( hasOwnProp( options, 'verbose' ) ) {
		if ( !isBoolean( options.verbose ) ) {
			return new TypeError( format( 'invalid option. `%s` option must be a boolean. Option: `%s`.', 'verbose', options.verbose ) );
		}
		opts.verbose = options.verbose;
	}
	if ( hasOwnProp( options, 'maxBuffer' ) ) {
		if ( !isPositiveInteger( options.maxBuffer ) ) {
			return new TypeError( format( 'invalid option. `%s` option must be a positive integer. Option: `%s`.', 'maxBuffer', options.maxBuffer ) );
		}
		opts.maxBuffer = options.maxBuffer;
	}
	if ( hasOwnProp( options, 'timeout' ) ) {
		if ( !isNonNegativeInteger( options.timeout ) ) {
			return new TypeError( format( 'invalid option. `%s` option must be a nonnegative integer. Option: `%s`.', 'timeout', options.timeout ) );
		}
		opts.timeout = options.timeout;
	}
	return null;
}
Validates function options.

@private
@param {Object} opts - destination object
@param {Options} options - function options
@param {string} [options.cwd] - current working directory of the child process
@param {boolean} [options.quiet] - boolean indicating whether to silence examples writing to `stdout`, but allow writing to `stderr`
@param {boolean} [options.silent] - boolean indicating whether to silence examples writing to both `stdout` and `stderr`
@param {boolean} [options.verbose] - boolean indicating whether to print plugin meta information
@param {PositiveInteger} [options.maxBuffer] - maximum buffer size for `stdout` and `stderr`
@param {NonNegativeInteger} [options.timeout] - maximum number of milliseconds allotted for the execution of each code block
@returns {(Error|null)} null or an error object

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