for
Obtains a symbol from the global registry. If no symbol exists for the key within the registry a new symbol is
created and stored in the global registry.
API Versioned:
From version 21.2.
Parameters:
key
-
The key for a symbol within the global registry.
Returns:
The found or newly created symbol.
keyFor
Returns the key within the global symbol registry under which the given symbol is stored.
Parameters:
symbol
-
The symbol to look for.
Returns:
The key for the given symbol if the symbol is known to the global registry, else return undefined
.