MCPcopy
hub / github.com/ampproject/amphtml / validateSrcContains

Function validateSrcContains

3p/3p.js:152–156  ·  view source on GitHub ↗
(string, src)

Source from the content-addressed store, hash-verified

150 * @param {string} src
151 */
152export function validateSrcContains(string, src) {
153 if (src.indexOf(string) === -1) {
154 throw new Error('Invalid src ' + src);
155 }
156}
157
158/**
159 * Utility function to perform a potentially asynchronous task

Callers 3

test-3p.jsFile · 0.90
dynadFunction · 0.90
adtechFunction · 0.90

Calls

no outgoing calls

Tested by

no test coverage detected