Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
31 changes: 16 additions & 15 deletions lib/node_modules/@stdlib/_tools/github/set-topics/lib/factory.js
Original file line number Diff line number Diff line change
Expand Up @@ -90,21 +90,22 @@ function factory( options, clbk ) {
throw new TypeError( format( 'invalid argument. Topics argument must be an array of strings. Value: `%s`.', topics ) );
}
query( slug, topics, opts, done );
/**
* Callback invoked after receiving an API response.
*
* @private
* @param {(Error|null)} error - error object
* @param {Object} data - response data
* @param {Object} info - response info
* @returns {void}
*/
function done( error, data, info ) {
error = error || null;
data = data || null;
info = info || null;
clbk( error, data, info );
}
}

/**
* Callback invoked after receiving an API response.
*
* @private
* @param {(Error|null)} error - error object
* @param {Object} data - response data
* @param {Object} info - response info
* @returns {void}
*/
function done( error, data, info ) {
error = error || null;
data = data || null;
info = info || null;
clbk( error, data, info );
}
}

Expand Down
Loading