"use strict";
/*
 * Copyright (c) 2022.
 * Author Peter Placzek (tada5hi)
 * For the full copyright and license information,
 * view the LICENSE file that was distributed with this source code.
 */
Object.defineProperty(exports, "__esModule", { value: true });
exports.includeParents = void 0;
function includeParents(data) {
    for (let i = 0; i < data.length; i++) {
        const parts = data[i].split('.');
        while (parts.length > 0) {
            parts.pop();
            if (parts.length > 0) {
                const value = parts.join('.');
                if (data.indexOf(value) === -1) {
                    data.unshift(value);
                }
            }
        }
    }
    return data;
}
exports.includeParents = includeParents;
//# sourceMappingURL=parents.js.map