source: node_modules/react-syntax-highlighter/dist/esm/async-languages/create-language-async-loader.js@ d24f17c

main
Last change on this file since d24f17c was d24f17c, checked in by Aleksandar Panovski <apano77@…>, 15 months ago

Initial commit

  • Property mode set to 100644
File size: 909 bytes
Line 
1import _asyncToGenerator from "@babel/runtime/helpers/asyncToGenerator";
2import _regeneratorRuntime from "@babel/runtime/regenerator";
3export default (function (name, loader) {
4 return /*#__PURE__*/function () {
5 var _ref = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime.mark(function _callee(registerLanguage) {
6 var module;
7 return _regeneratorRuntime.wrap(function _callee$(_context) {
8 while (1) {
9 switch (_context.prev = _context.next) {
10 case 0:
11 _context.next = 2;
12 return loader();
13
14 case 2:
15 module = _context.sent;
16 registerLanguage(name, module["default"] || module);
17
18 case 4:
19 case "end":
20 return _context.stop();
21 }
22 }
23 }, _callee);
24 }));
25
26 return function (_x) {
27 return _ref.apply(this, arguments);
28 };
29 }();
30});
Note: See TracBrowser for help on using the repository browser.