MCPcopy Create free account
hub / github.com/azirbel/npoint / removeFileNameHash

Function removeFileNameHash

scripts/build.js:32–36  ·  view source on GitHub ↗
(fileName)

Source from the content-addressed store, hash-verified

30// Input: /User/dan/app/build/static/js/main.82be8.js
31// Output: /static/js/main.js
32function removeFileNameHash(fileName) {
33 return fileName
34 .replace(paths.appBuild, '')
35 .replace(/\/?(.*)(\.\w+)(\.js|\.css)/, (match, p1, p2, p3) => p1 + p3);
36}
37
38// Input: 1024, 2048
39// Output: "(+1 KB)"

Callers 2

build.jsFile · 0.85
printFileSizesFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected