@lcap/nasl
Version:
NetEase Application Specific Language
14 lines • 436 B
JavaScript
;
Object.defineProperty(exports, "__esModule", { value: true });
exports.getBrothers = void 0;
/** 获取兄弟节点 */
function getBrothers(node) {
const { parentNode, parentKey } = node;
const list = parentNode[parentKey];
if (!Array.isArray(list)) {
throw new Error('当前节点并非在列表元素中');
}
return list;
}
exports.getBrothers = getBrothers;
//# sourceMappingURL=utils.js.map