Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Better cloning for td-builder.service.ts #58

Open
relu91 opened this issue May 23, 2023 · 0 comments
Open

Better cloning for td-builder.service.ts #58

relu91 opened this issue May 23, 2023 · 0 comments
Labels
effort: hours good first issue 👍 Good for newcomers priority: low (4) Low-priority issue that needs to be resolved scope: introduction type: enhancement New feature or request

Comments

@relu91
Copy link
Contributor

relu91 commented May 23, 2023

As introduced by #52, the td-builder.service.ts now use the usual trick of JSON.stringify and parse to clone the TD model and generate a valid Thing Description. Is there a better way to achieve this? Is this really performance critical?

Tracking

// FIXME: Get rid of this workaround.
const clonedModel = JSON.parse(JSON.stringify(model));

@relu91 relu91 added type: enhancement New feature or request good first issue 👍 Good for newcomers priority: low (4) Low-priority issue that needs to be resolved scope: introduction effort: hours labels May 24, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
effort: hours good first issue 👍 Good for newcomers priority: low (4) Low-priority issue that needs to be resolved scope: introduction type: enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

1 participant