Software zum Installieren eines Smart-Mirror Frameworks , zum Nutzen von hochschulrelevanten Informationen, auf einem Raspberry-Pi.
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

index-generators-umd.js 3.1KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109
  1. (function (global, factory) {
  2. typeof exports === 'object' && typeof module !== 'undefined' ? factory(exports) :
  3. typeof define === 'function' && define.amd ? define(['exports'], factory) :
  4. (global = typeof globalThis !== 'undefined' ? globalThis : global || self, factory(global.RegExtras = {}));
  5. }(this, (function (exports) { 'use strict';
  6. /* eslint-disable node/no-unsupported-features/es-syntax */
  7. // We copy the regular expression so as to be able to always
  8. // ensure the exec expression is a global one (and thereby prevent recursion)
  9. /**
  10. *
  11. * @param {RegExtras} RegExtras
  12. * @returns {void}
  13. */
  14. function addPrototypeMethods(RegExtras) {
  15. RegExtras.prototype.entries = /*#__PURE__*/regeneratorRuntime.mark(function _callee(str) {
  16. var matches, i, regex;
  17. return regeneratorRuntime.wrap(function _callee$(_context) {
  18. while (1) {
  19. switch (_context.prev = _context.next) {
  20. case 0:
  21. i = 0;
  22. regex = RegExtras.mixinRegex(this.regex, 'g');
  23. case 2:
  24. if (!((matches = regex.exec(str)) !== null)) {
  25. _context.next = 7;
  26. break;
  27. }
  28. _context.next = 5;
  29. return [i++, matches];
  30. case 5:
  31. _context.next = 2;
  32. break;
  33. case 7:
  34. case "end":
  35. return _context.stop();
  36. }
  37. }
  38. }, _callee, this);
  39. });
  40. RegExtras.prototype.values = /*#__PURE__*/regeneratorRuntime.mark(function _callee2(str) {
  41. var matches, regex;
  42. return regeneratorRuntime.wrap(function _callee2$(_context2) {
  43. while (1) {
  44. switch (_context2.prev = _context2.next) {
  45. case 0:
  46. regex = RegExtras.mixinRegex(this.regex, 'g');
  47. case 1:
  48. if (!((matches = regex.exec(str)) !== null)) {
  49. _context2.next = 6;
  50. break;
  51. }
  52. _context2.next = 4;
  53. return matches;
  54. case 4:
  55. _context2.next = 1;
  56. break;
  57. case 6:
  58. case "end":
  59. return _context2.stop();
  60. }
  61. }
  62. }, _callee2, this);
  63. });
  64. RegExtras.prototype.keys = /*#__PURE__*/regeneratorRuntime.mark(function _callee3(str) {
  65. var i, regex;
  66. return regeneratorRuntime.wrap(function _callee3$(_context3) {
  67. while (1) {
  68. switch (_context3.prev = _context3.next) {
  69. case 0:
  70. i = 0;
  71. regex = RegExtras.mixinRegex(this.regex, 'g');
  72. case 2:
  73. if (!(regex.exec(str) !== null)) {
  74. _context3.next = 7;
  75. break;
  76. }
  77. _context3.next = 5;
  78. return i++;
  79. case 5:
  80. _context3.next = 2;
  81. break;
  82. case 7:
  83. case "end":
  84. return _context3.stop();
  85. }
  86. }
  87. }, _callee3, this);
  88. });
  89. }
  90. exports.default = addPrototypeMethods;
  91. Object.defineProperty(exports, '__esModule', { value: true });
  92. })));