parsePathVariable = function (pathSegment) {
        if (String(pathSegment).startsWith(PATH_VARIABLE_IDENTIFIER)) {
            const separatorIndex = pathSegment.indexOf(PATH_VARIABLE_SEPARATOR);

            // remove path variable prefix and everything followed by the separator
            return pathSegment.slice(1, separatorIndex === -1 ? undefined : separatorIndex) || null;
        }

        return null;
    }
Returns path variable name from the path segment.

@private
@param {String} pathSegment -
@returns {String|null}