MCPcopy Index your code
hub / github.com/microsoft/SandDance / registerLoaders

Function registerLoaders

docs/app/js/sanddance-app.js:55525–55545  ·  view source on GitHub ↗
(loaders)

Source from the content-addressed store, hash-verified

55523 return state.loaderRegistry;
55524};
55525function registerLoaders(loaders) {
55526 var loaderRegistry = getGlobalLoaderRegistry();
55527 loaders = Array.isArray(loaders) ? loaders : [
55528 loaders
55529 ];
55530 var _iterator = _createForOfIteratorHelper(loaders), _step;
55531 try {
55532 var _loop = function _loop() {
55533 var loader = _step.value;
55534 var normalizedLoader = (0, _normalizeLoader.normalizeLoader)(loader);
55535 if (!loaderRegistry.find(function(registeredLoader) {
55536 return normalizedLoader === registeredLoader;
55537 })) loaderRegistry.unshift(normalizedLoader);
55538 };
55539 for(_iterator.s(); !(_step = _iterator.n()).done;)_loop();
55540 } catch (err) {
55541 _iterator.e(err);
55542 } finally{
55543 _iterator.f();
55544 }
55545}
55546function getRegisteredLoaders() {
55547 return getGlobalLoaderRegistry();
55548}

Callers

nothing calls this directly

Calls 3

getGlobalLoaderRegistryFunction · 0.70
_loopFunction · 0.70

Tested by

no test coverage detected