UNPKG

565 BJavaScriptView Raw
1"use strict";
2Object.defineProperty(exports, "__esModule", { value: true });
3exports.isPathArray = void 0;
4var params_count_1 = require("../parser/params-count");
5/**
6 * Iterates an array to check if it's an actual `PathArray`.
7 */
8function isPathArray(path) {
9 return (Array.isArray(path) &&
10 path.every(function (seg) {
11 var lk = seg[0].toLowerCase();
12 return params_count_1.paramsCount[lk] === seg.length - 1 && 'achlmqstvz'.includes(lk);
13 }));
14}
15exports.isPathArray = isPathArray;
16//# sourceMappingURL=is-path-array.js.map
\No newline at end of file