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

Function getResourceFilePath

ads/vendors/adskeeper.js:67–70  ·  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

65 * @return {string} Path to provided filename.
66 */
67 function getResourceFilePath(publisher) {
68 const publisherStr = publisher.replace(/[^a-zA-Z0-9]/g, '');
69 return `${publisherStr[0]}/${publisherStr[1]}`;
70 }
71
72 const url =
73 `https://jsc.adskeeper.com/${getResourceFilePath(data.publisher)}/` +

Callers 1

adskeeperFunction · 0.70

Calls 1

replaceMethod · 0.45

Tested by

no test coverage detected