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

Function findLoaderByContentType

docs/app/js/sanddance-app.js:57118–57132  ·  view source on GitHub ↗
(loaders, mimeType)

Source from the content-addressed store, hash-verified

57116 return null;
57117}
57118function findLoaderByContentType(loaders, mimeType) {
57119 var _iterator4 = _createForOfIteratorHelper(loaders), _step4;
57120 try {
57121 for(_iterator4.s(); !(_step4 = _iterator4.n()).done;){
57122 var loader = _step4.value;
57123 if (loader.mimeTypes && loader.mimeTypes.includes(mimeType)) return loader;
57124 if (mimeType === "application/x.".concat(loader.id)) return loader;
57125 }
57126 } catch (err) {
57127 _iterator4.e(err);
57128 } finally{
57129 _iterator4.f();
57130 }
57131 return null;
57132}
57133function findLoaderByExamingInitialData(loaders, data) {
57134 if (!data) return null;
57135 var _iterator5 = _createForOfIteratorHelper(loaders), _step5;

Callers 1

selectLoaderSyncFunction · 0.70

Calls 1

Tested by

no test coverage detected