mirror of
https://github.com/penpot/penpot.git
synced 2026-04-29 13:18:29 +00:00
15 lines
287 B
TypeScript
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,
|
|
};
|
|
});
|
|
}
|