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

Method _dateToISO

lib/Requestable.js:130–136  ·  view source on GitHub ↗

* if a `Date` is passed to this function it will be converted to an ISO string * @param {*} date - the object to attempt to coerce into an ISO date string * @return {string} - the ISO representation of `date` or whatever was passed in if it was not a date

(date)

Source from the content-addressed store, hash-verified

128 * @return {string} - the ISO representation of `date` or whatever was passed in if it was not a date
129 */
130 _dateToISO(date) {
131 if (date && (date instanceof Date)) {
132 date = date.toISOString();
133 }
134
135 return date;
136 }
137
138 /**
139 * A function that receives the result of the API request.

Callers 3

listCommitsMethod · 0.80
listNotificationsMethod · 0.80
listStarredGistsMethod · 0.80

Calls

no outgoing calls

Tested by

no test coverage detected