Returns a function that fetches a value from a map, or generates and sets it if not present.
Undefined is never returned, because if fn yields that, an error is thrown.
// Not contained in map, so it will run the uppercase function, // setting the value to the key 'hello'. constv = awaitm(`hello`); // Yields 'HELLO' constv1 = awaitm(`hello`); // Value exists, so it is returned ('HELLO')
Returns a function that fetches a value from a map, or generates and sets it if not present. Undefined is never returned, because if
fn
yields that, an error is thrown.See getOrGenerateSync for a synchronous version.