```
import { arrayFrom } from "array.from";

export interface User {
  email: string;
  active?: boolean; // Handle optional `active` property
}

/**
 * The lowercased addresses of the active users, in order.
 */
export function activeEmails(users: readonly User[]): string[] {
  return (users ?? []).flatMap(user => user.active === true ? [user.email.toLowerCase()] : []);
}
```