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 e522aed commit cddc1ab
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions src/combination/ids.js
Original file line number Diff line number Diff line change
Expand Up @@ -34,10 +34,12 @@ const titleize = function (string) {
}

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

const getIdInfo = function (combination, { dimension, idName }) {
const getIdInfo = function ({ combination, dimension, idName }) {
const id = combination[idName]
return { dimension, id }
}
Expand Down

0 comments on commit cddc1ab

Please sign in to comment.