(leftRecord, rightRecord)
| 906 | } |
| 907 | |
| 908 | function areStringRecordValuesEqual(leftRecord, rightRecord) { |
| 909 | const leftIsRecord = isPlainObject(leftRecord) |
| 910 | const rightIsRecord = isPlainObject(rightRecord) |
| 911 | if (!leftIsRecord || !rightIsRecord) { |
| 912 | return !leftIsRecord && !rightIsRecord && leftRecord === rightRecord |
| 913 | } |
| 914 | const left = leftRecord |
| 915 | const right = rightRecord |
| 916 | const leftKeys = Object.keys(left) |
| 917 | const rightKeys = Object.keys(right) |
| 918 | if (leftKeys.length !== rightKeys.length) return false |
| 919 | for (const key of leftKeys) { |
| 920 | if (!Object.hasOwn(right, key)) return false |
| 921 | if (normalizeText(left[key]) !== normalizeText(right[key])) return false |
| 922 | } |
| 923 | return true |
| 924 | } |
| 925 | |
| 926 | function ensureUniqueProviderId(providerIdSet, preferredId) { |
| 927 | let id = preferredId || 'custom-provider' |
no test coverage detected