Skip to content

Commit 0afb895

Browse files
karaalxhub
authored andcommitted
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
1 parent a946ca9 commit 0afb895

File tree

1 file changed

+0
-6
lines changed
  • packages/common/src/directives/ng_optimized_image

1 file changed

+0
-6
lines changed

packages/common/src/directives/ng_optimized_image/url.ts

Lines changed: 0 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -17,12 +17,6 @@ export function isAbsoluteUrl(src: string): boolean {
1717
return /^https?:\/\//.test(src);
1818
}
1919

20-
// Invokes a callback for each element in the array. Also invokes a callback
21-
// recursively for each nested array.
22-
export function deepForEach<T>(input: (T|any[])[], fn: (value: T) => void): void {
23-
input.forEach(value => Array.isArray(value) ? deepForEach(value, fn) : fn(value));
24-
}
25-
2620
// Given a URL, extract the hostname part.
2721
// If a URL is a relative one - the URL is returned as is.
2822
export function extractHostname(url: string): string {

0 commit comments

Comments
 (0)