UNPKG

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.

21 lines 739 B
"use strict"; Object.defineProperty(exports, "__esModule", { value: true }); exports.isStepLastOfItsLevel = void 0; function isStepLastOfItsLevel(options, step) { if (options[options.length - 1] === step) { return true; } for (var _i = 0, options_1 = options; _i < options_1.length; _i++) { var option = options_1[_i]; if (typeof option !== "string") { for (var _a = 0, _b = Object.values(option); _a < _b.length; _a++) { var a = _b[_a]; if (isStepLastOfItsLevel(a, step)) { return true; } } } } } exports.isStepLastOfItsLevel = isStepLastOfItsLevel; //# sourceMappingURL=isStepLastOfItsLevel.js.map