Raw
1 export const moduleProviderRegistrationKeyPrefix = "__providers__"
2
3 /**
4 * Return the key used to register a module provider in the container
5 * @param {string} moduleKey
6 * @return {string}
7 */
8 export function getProviderRegistrationKey({
9 providerId,
10 providerIdentifier,
11 }: {
12 providerId?: string
13 providerIdentifier?: string
14 }): string {
15 const registrationIdentifier = `${
16 providerIdentifier ? providerIdentifier : ""
17 }${providerId ? `${providerIdentifier ? "_" : ""}${providerId}` : ""}`
18 return moduleProviderRegistrationKeyPrefix + registrationIdentifier
19 }