MCPcopy Create free account
hub / github.com/github/docs / checkImage

Function checkImage

script/early-access/update-data-and-image-paths.js:167–175  ·  view source on GitHub ↗
(imageRef)

Source from the content-addressed store, hash-verified

165}
166
167function checkImage(imageRef) {
168 const imagePath = imageRef
169 .replace('/assets/images/', '')
170 // If early access is part of the path, remove it (since the path below already includes it)
171 .replace('early-access', '')
172
173 // If the image file doesn't exist in assets/images/early-access, exclude it
174 return fs.existsSync(path.posix.join(earlyAccessImages, imagePath))
175}

Callers 1

Calls

no outgoing calls

Tested by

no test coverage detected