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, 'builtins' ) ) {
		opts.builtins = options.builtins;
		if ( !isBoolean( opts.builtins ) ) {
			return new TypeError( format( 'invalid option. `%s` option must be a boolean. Option: `%s`.', 'builtins', opts.builtins ) );
		}
	}
	if ( hasOwnProp( options, 'walk' ) ) {
		opts.walk = options.walk;
		if ( !isBoolean( opts.walk ) ) {
			return new TypeError( format( 'invalid option. `%s` option must be a boolean. Option: `%s`.', 'walk', opts.walk ) );
		}
	}
	if ( hasOwnProp( options, 'aliases' ) ) {
		opts.aliases = options.aliases;
		if ( !isObject( opts.aliases ) ) {
			return new TypeError( format( 'invalid option. `%s` option must be an object. Option: `%s`.', 'aliases', opts.aliases ) );
		}
	}
	return null;
}
Validates function options.

@private
@param {Object} opts - destination object
@param {Options} options - function options
@param {boolean} [options.builtins] - boolean indicating whether to include built-in packages
@param {boolean} [options.walk] - boolean indicating whether to walk relative module dependencies
@param {Object} [options.aliases] - object mapping relative module dependency identifiers to other module identifiers
@returns {(Error|null)} error object or null

@example
var opts = {};
var options = {
    'builtins': false
};

var err = validate( opts, options );
if ( err ) {
   throw err;
}