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

Function noOrigin

test/unit/test-xhr.js:54–61  ·  view source on GitHub ↗
(url)

Source from the content-addressed store, hash-verified

52 }
53
54 function noOrigin(url) {
55 let index = url.indexOf('//');
56 if (index == -1) {
57 return url;
58 }
59 index = url.indexOf('/', index + 2);
60 return url.substring(index);
61 }
62
63 beforeEach(() => {
64 ampdocServiceForStub = env.sandbox.stub(Services, 'ampdocServiceFor');

Callers 1

test-xhr.jsFile · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected