penpot/plugins/apps/e2e/src/utils/clean-id.ts
Andrey Antukh ec1af4ad96 🎉 Import penpot-plugins repository
As commit 819a549e4928d2b1fa98e52bee82d59aec0f70d8
2025-12-30 14:56:15 +01:00

15 lines
287 B
TypeScript

import { Shape } from '../models/shape.model';
export function cleanId(id: string) {
return id.replace('~u', '');
}
export function idObjectToArray(obj: Shape[], newId: string) {
return Object.values(obj).map((item) => {
return {
...item,
id: newId,
};
});
}