MCPcopy Create free account
hub / github.com/ampproject/amphtml / getResourceFilePath

Function getResourceFilePath

ads/vendors/mgid.js:51–54  ·  view source on GitHub ↗

* Returns path for provided js filename * @param {string} publisher js filename * @return {string} Path to provided filename.

(publisher)

Source from the content-addressed store, hash-verified

49 * @return {string} Path to provided filename.
50 */
51 function getResourceFilePath(publisher) {
52 const publisherStr = publisher.replace(/[^a-zA-Z0-9]/g, '');
53 return `${publisherStr[0]}/${publisherStr[1]}`;
54 }
55
56 const url =
57 `https://jsc.mgid.com/${getResourceFilePath(data.publisher)}/` +

Callers 1

mgidFunction · 0.70

Calls 1

replaceMethod · 0.45

Tested by

no test coverage detected