fix(common): remove duplicate deepForEach (#47189)

This commit removes a duplicate deepForEach
function from url.ts. It is also in the
preconnect_link_checker, where it is actually
used.

PR Close #47189
This commit is contained in:
Kara Erickson
2022-08-18 14:40:55 -07:00
committed by Alex Rickabaugh
parent a946ca99c6
commit 0afb895f41
@@ -17,12 +17,6 @@ export function isAbsoluteUrl(src: string): boolean {
return /^https?:\/\//.test(src);
}
// Invokes a callback for each element in the array. Also invokes a callback
// recursively for each nested array.
export function deepForEach<T>(input: (T|any[])[], fn: (value: T) => void): void {
input.forEach(value => Array.isArray(value) ? deepForEach(value, fn) : fn(value));
}
// Given a URL, extract the hostname part.
// If a URL is a relative one - the URL is returned as is.
export function extractHostname(url: string): string {