0
Fork 0
mirror of https://github.com/penpot/penpot-exporter-figma-plugin.git synced 2024-12-22 21:53:27 -05:00
penpot-exporter-figma-plugin/ui-src/parser/IdLibrary.ts

20 lines
384 B
TypeScript
Raw Normal View History

import { Uuid } from '@ui/lib/types/utils/uuid';
class IdLibrary {
private idMap: Map<string, Uuid> = new Map();
public init() {
this.idMap.clear();
}
public get(figmaId: string): Uuid | undefined {
return this.idMap.get(figmaId);
}
public register(figmaId: string, id: Uuid) {
this.idMap.set(figmaId, id);
}
}
export const idLibrary = new IdLibrary();