UNPKG

@typed/content-hash

Version:

Content hash a directory of HTML/JS/CSS files and other static assets

4 lines (3 loc) 162 B
export function replaceHash(filePath: string, extension: string, hash: string) { return filePath.replace(new RegExp(`${extension}$`), `.${hash}${extension}`) }