docs: function validate( opts, options ) {
  	if ( !isObject( options ) ) {
  		return new TypeError( 'invalid input argument. Options argument must be an object. Value: `' + options + '`.' );
  	}
  	opts.username = options.username;
  	if ( !isString( opts.username ) ) {
  		return new TypeError( 'invalid option. Username option must be a string. Option: `' + opts.username + '`.' );
  	}
  	if ( options.hasOwnProperty( 'registry' ) ) {
  		opts.registry = options.registry;
  		if ( !isString( opts.registry ) ) {
  			return new TypeError( 'invalid option. Registry option must be a string. Option: `' + opts.registry + '`.' );
  		}
  	}
  	if ( options.hasOwnProperty( 'port' ) ) {
  		opts.port = options.port;
  		if ( !isNonNegativeInteger( opts.port ) ) {
  			return new TypeError( 'invalid option. Port option must be a nonnegative integer. Option: `' + opts.port + '`.' );
  		}
  	}
  	if ( options.hasOwnProperty( 'protocol' ) ) {
  		opts.protocol = options.protocol;
  		if ( opts.protocol !== 'http' && opts.protocol !== 'https' ) {
  			return new TypeError( 'invalid option. The following protocols are supported: `"http", "https"`. Option: `' + opts.protocol + '`.' );
  		}
  	}
  	return null;
  }