Skip to content

Commit

Permalink
Rename
Browse files Browse the repository at this point in the history
  • Loading branch information
ehmicky committed Sep 12, 2021
1 parent 8b963a3 commit 0808cdc
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/combination/ids.js
Original file line number Diff line number Diff line change
Expand Up @@ -59,7 +59,7 @@ export const hasSameCombinationIds = function (combinationA, combinationB) {
// Retrieve all unique combinations identifiers.
// For all combinations of a given result.
export const getCombinationsIds = function (combinations) {
return combinations.flatMap(getCombinationIds).filter(isNotSameDimDuplicate)
return combinations.flatMap(getCombinationIds).filter(isNotDuplicate)
}

export const getCombinationIds = function (combination) {
Expand All @@ -72,7 +72,7 @@ export const getCombinationIds = function (combination) {
// Remove duplicate ids with the same dimension, since this happens due to the
// cartesian product.
// Duplicate ids with a different dimension are validated later.
const isNotSameDimDuplicate = function ({ dimension, id }, index, idInfos) {
const isNotDuplicate = function ({ dimension, id }, index, idInfos) {
return !idInfos
.slice(index + 1)
.some((idInfo) => idInfo.dimension === dimension && idInfo.id === id)
Expand Down

0 comments on commit 0808cdc

Please sign in to comment.