Skip to content

Commit

Permalink
fix(common): remove duplicate deepForEach (#47189)
Browse files Browse the repository at this point in the history
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
  • Loading branch information
kara authored and alxhub committed Aug 24, 2022
1 parent f9511bf commit c5db867
Showing 1 changed file with 0 additions and 6 deletions.
6 changes: 0 additions & 6 deletions packages/common/src/directives/ng_optimized_image/url.ts
Expand Up @@ -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 {
Expand Down

0 comments on commit c5db867

Please sign in to comment.