Skip to content
This repository has been archived by the owner on Oct 28, 2019. It is now read-only.

Commit

Permalink
Fix values function
Browse files Browse the repository at this point in the history
  • Loading branch information
Dufgui committed Oct 30, 2019
1 parent 6e0ffb8 commit a4b52ed
Showing 1 changed file with 1 addition and 11 deletions.
12 changes: 1 addition & 11 deletions lib/jhipsteruml.js
Original file line number Diff line number Diff line change
Expand Up @@ -112,7 +112,7 @@ async function main() {
});
}

exportToJSON(entities, values(entityIdsByName), parsedData, entityNamesToGenerate);
exportToJSON(entities, Object.values(entityIdsByName), parsedData, entityNamesToGenerate);
EntityGenerator.generateEntities(Object.keys(entities), parsedData.classes, entityNamesToGenerate, options);

function initParserFactoryArgs() {
Expand Down Expand Up @@ -152,15 +152,5 @@ async function main() {
logger.info(`The file '${fileName}' has been written.`);
}

function values(object) {
if (object == null) {
throw new Error('The passed object must not be nil.');
}
const values = [];
for (let i = 0, keys = Object.keys(object); i < keys.length; i++) {
values.push(object[keys[i]]);
}
return values;
}
}
main()

0 comments on commit a4b52ed

Please sign in to comment.