unnecessary indirection
This commit is contained in:
		
							parent
							
								
									d79f7cae89
								
							
						
					
					
						commit
						d09c21e3c8
					
				
					 1 changed files with 1 additions and 1 deletions
				
			
		| 
						 | 
				
			
			@ -10,7 +10,7 @@ export async function map_concurrent<In, Out>(
 | 
			
		|||
  map_fn: (input: In) => Promise<Out | null>,
 | 
			
		||||
): Promise<Map<In, Out | null>> {
 | 
			
		||||
  // apply map_fn to inputs
 | 
			
		||||
  const outputs = await Promise.all([...inputs].map((input) => map_fn(input)));
 | 
			
		||||
  const outputs = await Promise.all([...inputs].map(map_fn));
 | 
			
		||||
 | 
			
		||||
  // create map object
 | 
			
		||||
  return new Map<In, Out | null>(
 | 
			
		||||
| 
						 | 
				
			
			
 | 
			
		|||
		Loading…
	
		Reference in a new issue