Local modifications to ClusterLabs/Anvil by Alteeve
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
 
 
 
 
 
 

11 lines
257 B

const getFilled = <T>(
array: T[],
{ isReverse = false }: { isReverse?: boolean } = {},
): T[] =>
array.filter(
isReverse
? (element: T) => element === undefined
: (element: T) => element !== undefined,
);
export default getFilled;