0
Fork 0
mirror of https://github.com/penpot/penpot-exporter-figma-plugin.git synced 2024-12-22 13:43:03 -05:00
penpot-exporter-figma-plugin/common/map.ts
2024-06-26 08:11:57 +02:00

7 lines
228 B
TypeScript

export const toObject = <T>(map: Map<string, T>): Record<string, T> => {
return Object.fromEntries(map.entries());
};
export const toArray = <T>(map: Map<string, T>): [string, T][] => {
return Array.from(map.entries());
};