Skip to content

Commit

Permalink
Refactoring
Browse files Browse the repository at this point in the history
  • Loading branch information
ehmicky committed Sep 12, 2021
1 parent cddc1ab commit d9942b2
Showing 1 changed file with 4 additions and 8 deletions.
12 changes: 4 additions & 8 deletions src/combination/ids.js
Original file line number Diff line number Diff line change
Expand Up @@ -34,14 +34,10 @@ const titleize = function (string) {
}

const getIdInfos = function (combination) {
return DIMENSIONS.map(({ dimension, idName }) =>
getIdInfo({ combination, dimension, idName }),
)
}

const getIdInfo = function ({ combination, dimension, idName }) {
const id = combination[idName]
return { dimension, id }
return DIMENSIONS.map(({ dimension, idName }) => ({
dimension,
id: combination[idName],
}))
}

const getId = function ({ id }) {
Expand Down

0 comments on commit d9942b2

Please sign in to comment.