function factory( options, clbk ) {
	var opts;
	var err;
	opts = copy( defaults );
	err = validate( opts, options );
	if ( err ) {
		throw err;
	}
	if ( opts.port === null ) {
		if ( opts.protocol === 'https' ) {
			opts.port = DEFAULT_HTTPS_PORT;
		} else {
			opts.port = DEFAULT_HTTP_PORT;
		}
	}
	if ( !isFunction( clbk ) ) {
		throw new TypeError( format( 'invalid argument. Callback argument must be a function. Value: `%s`.', clbk ) );
	}
	return star;

	/**
	* Stars a repository.
	*
	* @private
	* @param {string} slug - repository slug
	* @throws {TypeError} repository slug must be a string
	* @throws {Error} repository slug must consist of an `owner` and a `repository`
	* @returns {void}
	*/
	function star( slug ) {
		if ( !isString( slug ) ) {
			throw new TypeError( format( 'invalid argument. Repository slug must be a string. Value: `%s`.', slug ) );
		}
		if ( slug.split( '/' ).length !== 2 ) {
			throw new Error( format( 'invalid argument. Repository slug must consist of an owner and a repository (e.g., "stdlib-js/utils"). Value: `%s`.', slug ) );
		}
		query( slug, opts, done );
		/**
		* Callback invoked after receiving an API response.
		*
		* @private
		* @param {(Error|null)} error - error object
		* @param {Object} info - response info
		* @returns {void}
		*/
		function done( error, info ) {
			error = error || null;
			info = info || null;
			clbk( error, info );
		}
	}
}
Returns a function for starring a repository.

@param {Object} options - function options
@param {string} options.token - GitHub access token
@param {string} [options.useragent] - user agent string
@param {Function} clbk - callback to invoke upon query completion
@throws {TypeError} callback argument must be a function
@returns {Function} function for starring a repository