@carbon/ibm-products
Version:
Carbon for IBM Products
24 lines (20 loc) • 565 B
JavaScript
/**
* Copyright IBM Corp. 2020, 2025
*
* This source code is licensed under the Apache-2.0 license found in the
* LICENSE file in the root directory of this source tree.
*/
;
const getNumberOfHiddenSteps = (stepData, initialStep) => {
let numberOfHiddenSteps = 0;
stepData.forEach((step, stepIndex) => {
if (stepIndex + 1 > initialStep) {
return;
}
if (step.shouldIncludeStep === false) {
numberOfHiddenSteps += 1;
}
});
return numberOfHiddenSteps;
};
exports.getNumberOfHiddenSteps = getNumberOfHiddenSteps;