mirror of
https://github.com/angular/angular.git
synced 2026-09-14 13:54:52 +08:00
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:
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 {
|
||||
|
||||
Reference in New Issue
Block a user