(name, namespace, taken)
| 717 | // already scopes it. Its wire key is untouched. Keeps the namespace (`mozPermanent`) only if |
| 718 | // dropping it would collide with a shared field on the same record. |
| 719 | function vendorFieldName(name, namespace, taken) { |
| 720 | const stripped = name.replace(`${namespace}:`, '') |
| 721 | return taken.has(stripped) ? `${namespace}${pascalCase(stripped)}` : stripped |
| 722 | } |
| 723 | |
| 724 | function pascalCase(word) { |
| 725 | return word.charAt(0).toUpperCase() + word.slice(1) |
no test coverage detected