MCPcopy Index your code
hub / github.com/ampproject/amphtml / getFragment

Function getFragment

src/url.js:368–374  ·  view source on GitHub ↗
(url)

Source from the content-addressed store, hash-verified

366 * @return {string}
367 */
368export function getFragment(url) {
369 const index = url.indexOf('#');
370 if (index == -1) {
371 return '';
372 }
373 return url.substring(index);
374}
375
376/**
377 * Returns whether the URL has the origin of a proxy.

Callers 2

getEncodedLocation_Method · 0.90
removeSearchFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected