MCPcopy Index your code
hub / github.com/github/docs / isChecksummed

Function isChecksummed

middleware/static-asset-caching.js:12–21  ·  view source on GitHub ↗
(path)

Source from the content-addressed store, hash-verified

10// True if the URL is known to contain some pattern of a checksum that
11// would make it intelligently different if its content has changed.
12function isChecksummed(path) {
13 if (path.startsWith('/assets/cb-')) return true
14 if (path.startsWith('/_next/static')) {
15 // E.g. /_next/static/chunks/0e226fb0-f47400d931ae7427.js
16 if (/[a-f0-9]{16}/.test(path)) return true
17 // E.g. /_next/static/NkhGE2zLVuDHVh7pXdtVC/_buildManifest.js
18 if (/\/\w{21}\//.test(path)) return true
19 }
20 return false
21}

Callers 1

setStaticAssetCachingFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected