MCPcopy Index your code
hub / github.com/github-tools/github / _getOptionsWithDefaults

Method _getOptionsWithDefaults

lib/Requestable.js:115–123  ·  view source on GitHub ↗

* Sets the default options for API requests * @protected * @param {Object} [requestOptions={}] - the current options for the request * @return {Object} - the options to pass to the request

(requestOptions = {})

Source from the content-addressed store, hash-verified

113 * @return {Object} - the options to pass to the request
114 */
115 _getOptionsWithDefaults(requestOptions = {}) {
116 if (!(requestOptions.visibility || requestOptions.affiliation)) {
117 requestOptions.type = requestOptions.type || 'all';
118 }
119 requestOptions.sort = requestOptions.sort || 'updated';
120 requestOptions.per_page = requestOptions.per_page || '100'; // eslint-disable-line
121
122 return requestOptions;
123 }
124
125 /**
126 * if a `Date` is passed to this function it will be converted to an ISO string

Callers 4

getReposMethod · 0.80
constructorMethod · 0.80
listReposMethod · 0.80
listStarredReposMethod · 0.80

Calls

no outgoing calls

Tested by

no test coverage detected