Lightweight named singleton factory, intended for hot-module
replacement situations. Takes a (preferably globally unique)
factory function. If there's no value defined for
id yet, calls
factory to produce the singleton value and caches it. Returns
Note: All created values will remain in the private cache until the JS process terminates or this module itself has been reloaded (though the latter shouldn't happen in an HMR workflow).
Generated using TypeDoc