mirror of
https://gitlab.com/PronounsPage/PronounsPage.git
synced 2025-08-03 19:17:07 -04:00
6 lines
193 B
TypeScript
6 lines
193 B
TypeScript
export type WithKey<T> = T & { key: string };
|
|
|
|
export default <T>(record: Record<string, T>): WithKey<T>[] => {
|
|
return Object.entries(record).map(([key, value]) => ({ ...value, key }));
|
|
};
|