Filters the input array to all valid values from the given enum.
A new array (does not mutate).
enum MyEnum { A = 'a', B = 'b',}const result = filterToEnumValues([1, 2, 3, 'a', 'b', MyEnum.A], MyEnum); // result is `[MyEnum.A, MyEnum.B, MyEnum.A]` Copy
enum MyEnum { A = 'a', B = 'b',}const result = filterToEnumValues([1, 2, 3, 'a', 'b', MyEnum.A], MyEnum); // result is `[MyEnum.A, MyEnum.B, MyEnum.A]`
@augment-vir/common
Filters the input array to all valid values from the given enum.