69
let remaining = value?.length ?? 0;
70
if (remaining > MAX_PROPERTY_LENGTH) {
72
>
let count = 0;
73
>
while (remaining > 0 && count < MAX_CONCATENATED_PROPERTIES) {
74
>
count += 1;
75
>
let propertyName = key;
76
>
if (count > 1) {
77
>
propertyName = key + '_' + (count < 10 ? '0' : '') + count;
78
>
}
79
>
let offsetIndex = lastStartIndex + MAX_PROPERTY_LENGTH;
80
>
if (remaining < MAX_PROPERTY_LENGTH) {
81
>
offsetIndex = lastStartIndex + remaining;
82
>
}
83
>
newProperties[propertyName] = value!.slice(lastStartIndex, offsetIndex);
84
>
remaining -= MAX_PROPERTY_LENGTH;
85
>
lastStartIndex += MAX_PROPERTY_LENGTH;
86
>
}
87
>
}
88
}
89
return newProperties;