Changeset 0c6b92a for imaps-frontend/node_modules/ignore/legacy.js
- Timestamp:
- 12/12/24 17:06:06 (5 weeks ago)
- Branches:
- main
- Parents:
- d565449
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
imaps-frontend/node_modules/ignore/legacy.js
rd565449 r0c6b92a 7 7 function _toPrimitive(input, hint) { if (_typeof(input) !== "object" || input === null) return input; var prim = input[Symbol.toPrimitive]; if (prim !== undefined) { var res = prim.call(input, hint || "default"); if (_typeof(res) !== "object") return res; throw new TypeError("@@toPrimitive must return a primitive value."); } return (hint === "string" ? String : Number)(input); } 8 8 function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } } 9 function _slicedToArray(arr, i) { return _arrayWithHoles(arr) || _iterableToArrayLimit(arr, i) || _unsupportedIterableToArray(arr, i) || _nonIterableRest(); } 10 function _nonIterableRest() { throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method."); } 11 function _unsupportedIterableToArray(o, minLen) { if (!o) return; if (typeof o === "string") return _arrayLikeToArray(o, minLen); var n = Object.prototype.toString.call(o).slice(8, -1); if (n === "Object" && o.constructor) n = o.constructor.name; if (n === "Map" || n === "Set") return Array.from(o); if (n === "Arguments" || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)) return _arrayLikeToArray(o, minLen); } 12 function _arrayLikeToArray(arr, len) { if (len == null || len > arr.length) len = arr.length; for (var i = 0, arr2 = new Array(len); i < len; i++) arr2[i] = arr[i]; return arr2; } 13 function _iterableToArrayLimit(arr, i) { var _i = null == arr ? null : "undefined" != typeof Symbol && arr[Symbol.iterator] || arr["@@iterator"]; if (null != _i) { var _s, _e, _x, _r, _arr = [], _n = !0, _d = !1; try { if (_x = (_i = _i.call(arr)).next, 0 === i) { if (Object(_i) !== _i) return; _n = !1; } else for (; !(_n = (_s = _x.call(_i)).done) && (_arr.push(_s.value), _arr.length !== i); _n = !0); } catch (err) { _d = !0, _e = err; } finally { try { if (!_n && null != _i["return"] && (_r = _i["return"](), Object(_r) !== _r)) return; } finally { if (_d) throw _e; } } return _arr; } } 14 function _arrayWithHoles(arr) { if (Array.isArray(arr)) return arr; } 9 15 // A simple implementation of make-array 10 16 function makeArray(subject) { … … 83 89 // (a\ ) -> (a ) 84 90 // (a ) -> (a) 91 // (a ) -> (a) 85 92 // (a \ ) -> (a ) 86 / \\?\s+$/, function (match) {87 return m atch.indexOf('\\') === 0 ? SPACE : EMPTY;93 /((?:\\\\)*?)(\\?\s+)$/, function (_, m1, m2) { 94 return m1 + (m2.indexOf('\\') === 0 ? SPACE : EMPTY); 88 95 }], 89 96 // replace (\ ) with ' ' 90 [/\\\s/g, function () { 91 return SPACE; 97 // (\ ) -> ' ' 98 // (\\ ) -> '\\ ' 99 // (\\\ ) -> '\\ ' 100 [/(\\+?)\s/g, function (_, m1) { 101 var length = m1.length; 102 return m1.slice(0, length - length % 2) + SPACE; 92 103 }], 93 104 // Escape metacharacters … … 278 289 var source = regexCache[pattern]; 279 290 if (!source) { 280 source = REPLACERS.reduce(function (prev, current) { 281 return prev.replace(current[0], current[1].bind(pattern)); 291 source = REPLACERS.reduce(function (prev, _ref) { 292 var _ref2 = _slicedToArray(_ref, 2), 293 matcher = _ref2[0], 294 replacer = _ref2[1]; 295 return prev.replace(matcher, replacer.bind(pattern)); 282 296 }, pattern); 283 297 regexCache[pattern] = source; … … 354 368 var Ignore = /*#__PURE__*/function () { 355 369 function Ignore() { 356 var _ref = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : {},357 _ref $ignorecase = _ref.ignorecase,358 ignorecase = _ref $ignorecase === void 0 ? true : _ref$ignorecase,359 _ref $ignoreCase = _ref.ignoreCase,360 ignoreCase = _ref $ignoreCase === void 0 ? ignorecase : _ref$ignoreCase,361 _ref $allowRelativePat = _ref.allowRelativePaths,362 allowRelativePaths = _ref $allowRelativePat === void 0 ? false : _ref$allowRelativePat;370 var _ref3 = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : {}, 371 _ref3$ignorecase = _ref3.ignorecase, 372 ignorecase = _ref3$ignorecase === void 0 ? true : _ref3$ignorecase, 373 _ref3$ignoreCase = _ref3.ignoreCase, 374 ignoreCase = _ref3$ignoreCase === void 0 ? ignorecase : _ref3$ignoreCase, 375 _ref3$allowRelativePa = _ref3.allowRelativePaths, 376 allowRelativePaths = _ref3$allowRelativePa === void 0 ? false : _ref3$allowRelativePa; 363 377 _classCallCheck(this, Ignore); 364 378 define(this, KEY_IGNORE, true);
Note:
See TracChangeset
for help on using the changeset viewer.