use-wizard
Version:
A dead-easy-to-use light-weight react hook to handle multi-paths wizards (and simple wizards too) and navigate into them.
19 lines • 622 B
JavaScript
;
Object.defineProperty(exports, "__esModule", { value: true });
exports.isStepLastOfLasts = void 0;
function isStepLastOfLasts(options, step) {
if (!options) {
return false;
}
if (typeof options[options.length - 1] === "string") {
return options[options.length - 1] === step;
}
for (var _i = 0, _a = Object.values(options[options.length - 1]); _i < _a.length; _i++) {
var obj = _a[_i];
if (isStepLastOfLasts(obj, step)) {
return true;
}
}
}
exports.isStepLastOfLasts = isStepLastOfLasts;
//# sourceMappingURL=isStepLastOfLasts.js.map