Skip to content

Unique identifiers #8

@ConstantinHildebrandt

Description

@ConstantinHildebrandt

I would love to have the option to get unique identifiers for every appearance of a component. In most cases the name is enough to identify having the same thing.

So instead of only:
const assemblyStructure = parser.parse();
It would be nice to have:
const assemblyStructure = parser.parseUniqueId();

All you need to do is:
npm install uuid --save

And then add as a kind of post processing the following method:
`function createUniqueIds(stepJson) {

stepJson.id = uuid();

if (stepJson.contains.length != 0) {
    stepJson.contains.forEach(element => {
        createUniqueIds(element);
    });
}
return stepJson

}`

This method should be called after having created the json file.

Metadata

Metadata

Labels

enhancementNew feature or request

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions