MCPcopy Index your code
hub / github.com/nodejs/nodejs.org / findAuthorLogin

Function findAuthorLogin

apps/site/scripts/release-post/index.mjs:195–208  ·  view source on GitHub ↗
(version, section)

Source from the content-addressed store, hash-verified

193 Promise.all(downloadsTable(version).map(urlOrComingSoon));
194
195const findAuthorLogin = (version, section) => {
196 // looking for the @author part of the release header, e.g.:
197 // ## 2016-03-08, Version 5.8.0 (Stable). @Fishrock123
198 // ## 2015-10-13, Version 4.2.1 'Argon' (LTS), @jasnell
199 // ## 2015-09-08, Version 4.0.0 (Stable), @rvagg
200 const rxReleaseAuthor = /^## .*? \([^)]+\)[,.] @(\S+)/;
201 const matches = rxReleaseAuthor.exec(section);
202
203 return new Promise((resolve, reject) =>
204 matches && matches.length && matches[1]
205 ? resolve(matches[1])
206 : reject(ERRORS.RELEASE_EXISTS(version))
207 );
208};
209
210const urlOrComingSoon = binary => {
211 return request({ url: binary.url, method: 'HEAD' }).then(

Callers 1

fetchAuthorFunction · 0.85

Calls 1

resolveFunction · 0.85

Tested by

no test coverage detected