gdc-common-utils-ts 2.3.22 → 2.3.23
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/utils/consent.js +9 -1
- package/package.json +1 -1
package/dist/utils/consent.js
CHANGED
|
@@ -230,8 +230,16 @@ function normalizeConsentRoleValue(value) {
|
|
|
230
230
|
if (!trimmed || trimmed === '*')
|
|
231
231
|
return trimmed;
|
|
232
232
|
const [system, code] = trimmed.includes('|') ? trimmed.split('|', 2) : ['', trimmed];
|
|
233
|
+
const normalizedSystem = system.trim().toLowerCase();
|
|
234
|
+
const canonicalSystem = [
|
|
235
|
+
'isco-08',
|
|
236
|
+
'org.ilo.isco',
|
|
237
|
+
'org.ilo.isco-08',
|
|
238
|
+
].includes(normalizedSystem)
|
|
239
|
+
? 'org.ilo.isco-08'
|
|
240
|
+
: normalizedSystem;
|
|
233
241
|
return system
|
|
234
|
-
? `${
|
|
242
|
+
? `${canonicalSystem}|${code.trim().toLowerCase()}`
|
|
235
243
|
: trimmed.toLowerCase();
|
|
236
244
|
}
|
|
237
245
|
function parseNormalizedConsentRole(value) {
|