UNPKG

@n3okill/utils

Version:
21 lines 611 B
"use strict"; Object.defineProperty(exports, "__esModule", { value: true }); exports.getNameParts = getNameParts; const isEmpty_1 = require("../type/isEmpty"); /** * @internal * @ignore * @param {Array<string>} names * @returns {Array<string>} */ function getNameParts(names) { const parts = []; names.forEach((part) => part.indexOf(".") === -1 && !(0, isEmpty_1.isEmpty)(part) ? part .replace(/\[(\d+)]/g, ".$1") .split(".") .forEach((v) => (v ? parts.push(v) : "")) : parts.push(part)); return parts; } //# sourceMappingURL=_internal.js.map