MCPcopy Index your code
hub / github.com/jantimon/html-webpack-plugin / appendHash

Method appendHash

index.js:439–445  ·  view source on GitHub ↗

* Appends a cache busting hash to the query string of the url * E.g. http://localhost:8080/ -> http://localhost:8080/?50c9096ba6183fd728eeb065a26ec175 * * @private * @param {string | undefined} url * @param {string} hash

(url, hash)

Source from the content-addressed store, hash-verified

437 * @param {string} hash
438 */
439 appendHash(url, hash) {
440 if (!url) {
441 return url;
442 }
443
444 return url + (url.indexOf("?") === -1 ? "?" : "&") + hash;
445 }
446
447 /**
448 * Generate the relative or absolute base url to reference images, css, and javascript files

Callers 2

generateFaviconMethod · 0.95

Calls

no outgoing calls

Tested by

no test coverage detected