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, 'name' ) ) {
		opts.name = options.name;
		if ( !isString( opts.name ) ) {
			return new TypeError( format( 'invalid option. `%s` option must be a string. Option: `%s`.', 'name', opts.name ) );
		}
		if ( !RE.test( opts.name ) ) {
			return new Error( format( 'invalid option. `%s` option must begin with "@stdlib/". Option: `%s`.', 'name', opts.name ) );
		}
	}
	if ( hasOwnProp( options, 'desc' ) ) {
		opts.desc = options.desc;
		if ( !isString( opts.desc ) ) {
			return new TypeError( format( 'invalid option. `%s` option must be a string. Option: `%s`.', 'desc', opts.desc ) );
		}
	}
	if ( hasOwnProp( options, 'keywords' ) ) {
		opts.keywords = options.keywords;
		if ( !isStringArray( opts.keywords ) ) {
			return new TypeError( format( 'invalid option. `%s` option must be an array of strings. Option: `%s`.', 'keywords', opts.keywords ) );
		}
	}
	if ( hasOwnProp( options, 'cmd' ) ) {
		opts.cmd = options.cmd;
		if ( !isString( opts.cmd ) ) {
			return new TypeError( format( 'invalid option. `%s` option must be a string. Option: `%s`.', 'cmd', opts.cmd ) );
		}
	}
	if ( hasOwnProp( options, 'browser' ) ) {
		opts.browser = options.browser;
		if ( !isString( opts.browser ) ) {
			return new TypeError( format( 'invalid option. `%s` option must be a string. Option: `%s`.', 'browser', opts.browser ) );
		}
	}
	return null;
}
Validates function options.

@private
@param {Object} opts - destination object
@param {Options} options - function options
@param {string} [options.name] - package name
@param {string} [options.desc] - package description
@param {StringArray} [options.keywords] - package keywords
@param {string} [options.cmd] - package command for use as a CLI tool
@param {string} [options.browser] - browser entry point
@returns {(Error|null)} error object or null

@example
var opts = {};
var options = {
    'name': '@stdlib/beep/boop'
};

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