@nejs/basic-extensions 2.5.0 → 2.6.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (37) hide show
  1. package/README.md +151 -118
  2. package/dist/@nejs/basic-extensions.bundle.2.5.0.js +8 -0
  3. package/dist/@nejs/basic-extensions.bundle.2.5.0.js.map +7 -0
  4. package/dist/cjs/arrayextensions.js +56 -54
  5. package/dist/cjs/arrayextensions.js.map +1 -1
  6. package/dist/cjs/functionextensions.js +81 -79
  7. package/dist/cjs/functionextensions.js.map +1 -1
  8. package/dist/cjs/mapextensions.js +23 -21
  9. package/dist/cjs/mapextensions.js.map +1 -1
  10. package/dist/cjs/objectextensions.js +49 -17
  11. package/dist/cjs/objectextensions.js.map +1 -1
  12. package/dist/cjs/setextensions.js +191 -189
  13. package/dist/cjs/setextensions.js.map +1 -1
  14. package/dist/cjs/stringextensions.js +69 -67
  15. package/dist/cjs/stringextensions.js.map +1 -1
  16. package/dist/mjs/arrayextensions.js +56 -54
  17. package/dist/mjs/arrayextensions.js.map +1 -1
  18. package/dist/mjs/functionextensions.js +81 -79
  19. package/dist/mjs/functionextensions.js.map +1 -1
  20. package/dist/mjs/mapextensions.js +23 -21
  21. package/dist/mjs/mapextensions.js.map +1 -1
  22. package/dist/mjs/objectextensions.js +49 -17
  23. package/dist/mjs/objectextensions.js.map +1 -1
  24. package/dist/mjs/setextensions.js +191 -189
  25. package/dist/mjs/setextensions.js.map +1 -1
  26. package/dist/mjs/stringextensions.js +69 -67
  27. package/dist/mjs/stringextensions.js.map +1 -1
  28. package/docs/index.html +636 -478
  29. package/package.json +4 -3
  30. package/src/arrayextensions.js +56 -55
  31. package/src/functionextensions.js +87 -85
  32. package/src/mapextensions.js +26 -24
  33. package/src/objectextensions.js +52 -17
  34. package/src/setextensions.js +216 -214
  35. package/src/stringextensions.js +69 -67
  36. package/dist/@nejs/basic-extensions.bundle.2.3.0.js +0 -8
  37. package/dist/@nejs/basic-extensions.bundle.2.3.0.js.map +0 -7
@@ -3,202 +3,204 @@ Object.defineProperty(exports, "__esModule", { value: true });
3
3
  exports.SetPrototypeExtensions = void 0;
4
4
  const extension_1 = require("@nejs/extension");
5
5
  exports.SetPrototypeExtensions = new extension_1.Patch(Set.prototype, {
6
- /**
7
- * Merges multiple iterables into the set. Each element from the iterables
8
- * is added to the set, ensuring uniqueness of all elements. This method
9
- * mutates the original set.
10
- *
11
- * @param {...Iterable} iterables - One or more iterable objects (like Set
12
- * or Array) whose elements will be added to the set.
13
- */
14
- concat(...iterables) {
15
- for (const iterable of iterables) {
16
- if (typeof iterable === 'string' ||
17
- !Reflect.has(iterable, Symbol.iterator)) {
18
- this.add(iterable);
19
- continue;
6
+ [extension_1.Patch.kMutablyHidden]: {
7
+ /**
8
+ * Merges multiple iterables into the set. Each element from the iterables
9
+ * is added to the set, ensuring uniqueness of all elements. This method
10
+ * mutates the original set.
11
+ *
12
+ * @param {...Iterable} iterables - One or more iterable objects (like Set
13
+ * or Array) whose elements will be added to the set.
14
+ */
15
+ concat(...iterables) {
16
+ for (const iterable of iterables) {
17
+ if (typeof iterable === 'string' ||
18
+ !Reflect.has(iterable, Symbol.iterator)) {
19
+ this.add(iterable);
20
+ continue;
21
+ }
22
+ for (const element of iterable) {
23
+ this.add(element);
24
+ }
20
25
  }
21
- for (const element of iterable) {
22
- this.add(element);
26
+ },
27
+ /**
28
+ * Checks to see if any value within the `Set` loosely equals the supplied
29
+ * value.
30
+ *
31
+ * @param {*} value any value that might be loosely equal to an item in the
32
+ * set, as opposed to {@link Set.has} which is the equivalent of a strict or
33
+ * triple equals (`===`) check
34
+ * @returns {boolean} `true` if any value within the set is loosely equal to
35
+ * the supplied value, `false` otherwise
36
+ */
37
+ contains(value) {
38
+ for (const element of this) {
39
+ if (value == element) {
40
+ return true;
41
+ }
23
42
  }
24
- }
25
- },
26
- /**
27
- * Checks to see if any value within the `Set` loosely equals the supplied
28
- * value.
29
- *
30
- * @param {*} value any value that might be loosely equal to an item in the
31
- * set, as opposed to {@link Set.has} which is the equivalent of a strict or
32
- * triple equals (`===`) check
33
- * @returns {boolean} `true` if any value within the set is loosely equal to
34
- * the supplied value, `false` otherwise
35
- */
36
- contains(value) {
37
- for (const element of this) {
38
- if (value == element) {
39
- return true;
43
+ return false;
44
+ },
45
+ /**
46
+ * Checks if every element in the set passes the test implemented by the
47
+ * provided function. The function is called with each element of the set.
48
+ * Note: Since sets do not have indices, the index parameter is always NaN.
49
+ *
50
+ * @param {Function} everyFn - The function to test each element. Receives
51
+ * the element, index (always NaN), and the set itself.
52
+ * @param {Object} [thisArg] - Optional. Value to use as `this` when executing
53
+ * `everyFn`.
54
+ * @throws {TypeError} If `everyFn` is not a function.
55
+ * @returns {boolean} True if every element passes the test, false otherwise.
56
+ */
57
+ every(everyFn, thisArg) {
58
+ if (typeof everyFn !== 'function') {
59
+ throw new TypeError(`everyFn must be a function! Received ${String(everyFn)}`);
40
60
  }
41
- }
42
- return false;
43
- },
44
- /**
45
- * Checks if every element in the set passes the test implemented by the
46
- * provided function. The function is called with each element of the set.
47
- * Note: Since sets do not have indices, the index parameter is always NaN.
48
- *
49
- * @param {Function} everyFn - The function to test each element. Receives
50
- * the element, index (always NaN), and the set itself.
51
- * @param {Object} [thisArg] - Optional. Value to use as `this` when executing
52
- * `everyFn`.
53
- * @throws {TypeError} If `everyFn` is not a function.
54
- * @returns {boolean} True if every element passes the test, false otherwise.
55
- */
56
- every(everyFn, thisArg) {
57
- if (typeof everyFn !== 'function') {
58
- throw new TypeError(`everyFn must be a function! Received ${String(everyFn)}`);
59
- }
60
- let found = 0;
61
- for (const element of this) {
62
- if (everyFn.call(thisArg, element, NaN, this)) {
63
- found++;
61
+ let found = 0;
62
+ for (const element of this) {
63
+ if (everyFn.call(thisArg, element, NaN, this)) {
64
+ found++;
65
+ }
64
66
  }
65
- }
66
- return (found === this.size);
67
- },
68
- /**
69
- * Finds the first element in the set satisfying the provided testing
70
- * function. If no elements satisfy the testing function, undefined is
71
- * returned. The function is called with each element of the set.
72
- * Note: Since sets do not have indices, the index parameter is always NaN.
73
- *
74
- * @param {Function} findFn - The function to execute on each element. It
75
- * receives the element, index (always NaN), and the set itself.
76
- * @param {Object} [thisArg] - Optional. Value to use as `this` when executing
77
- * `findFn`.
78
- * @throws {TypeError} If `findFn` is not a function.
79
- * @returns {*} The first element that satisfies `findFn`, or undefined.
80
- */
81
- find(findFn, thisArg) {
82
- if (typeof findFn !== 'function') {
83
- throw new TypeError(`findFn must be a function! Received ${String(findFn)}`);
84
- }
85
- for (const element of this) {
86
- const match = findFn.call(thisArg, element, NaN, this);
87
- if (match) {
88
- return element;
67
+ return (found === this.size);
68
+ },
69
+ /**
70
+ * Finds the first element in the set satisfying the provided testing
71
+ * function. If no elements satisfy the testing function, undefined is
72
+ * returned. The function is called with each element of the set.
73
+ * Note: Since sets do not have indices, the index parameter is always NaN.
74
+ *
75
+ * @param {Function} findFn - The function to execute on each element. It
76
+ * receives the element, index (always NaN), and the set itself.
77
+ * @param {Object} [thisArg] - Optional. Value to use as `this` when executing
78
+ * `findFn`.
79
+ * @throws {TypeError} If `findFn` is not a function.
80
+ * @returns {*} The first element that satisfies `findFn`, or undefined.
81
+ */
82
+ find(findFn, thisArg) {
83
+ if (typeof findFn !== 'function') {
84
+ throw new TypeError(`findFn must be a function! Received ${String(findFn)}`);
89
85
  }
90
- }
91
- return undefined;
92
- },
93
- /**
94
- * Finds the last element in the set satisfying the provided testing function.
95
- * If no elements satisfy the testing function, undefined is returned. The
96
- * function is called with each element of the set in reverse order.
97
- * Note: Since sets do not have indices, the index parameter is always NaN.
98
- *
99
- * @param {Function} findFn - The function to execute on each element. It
100
- * receives the element, index (always NaN), and the set itself.
101
- * @param {Object} [thisArg] - Optional. Value to use as `this` when executing
102
- * `findFn`.
103
- * @throws {TypeError} If `findFn` is not a function.
104
- * @returns {*} The last element that satisfies `findFn`, or undefined.
105
- */
106
- findLast(findFn, thisArg) {
107
- if (typeof findFn !== 'function') {
108
- throw new TypeError(`findFn must be a function! Received ${String(findFn)}`);
109
- }
110
- const found = [];
111
- for (const element of this) {
112
- const match = findFn.call(thisArg, element, NaN, this);
113
- if (match) {
114
- found.push(element);
86
+ for (const element of this) {
87
+ const match = findFn.call(thisArg, element, NaN, this);
88
+ if (match) {
89
+ return element;
90
+ }
115
91
  }
116
- }
117
- if (found.length) {
118
- return found[found.length - 1];
119
- }
120
- return undefined;
121
- },
122
- /**
123
- * A getter property that returns the number of elements in the set.
124
- * This is an alias for the `size` property of the set.
125
- *
126
- * @returns {number} The number of elements in the set.
127
- */
128
- get length() {
129
- return this.size;
130
- },
131
- /**
132
- * Creates a new array populated with the results of calling the provided
133
- * function on every element in the set. The function is called with each
134
- * element of the set. Note: Since sets do not have indices, the index
135
- * parameter is always NaN.
136
- *
137
- * @param {Function} mapFn - The function to execute on each element. It
138
- * receives the element, index (always NaN), and the set itself.
139
- * @param {Object} [thisArg] - Optional. Value to use as `this` when executing
140
- * `mapFn`.
141
- * @throws {TypeError} If `mapFn` is not a function.
142
- * @returns {Array} A new array with each element being the result of the
143
- * `mapFn`.
144
- */
145
- map(mapFn, thisArg) {
146
- if (typeof mapFn !== 'function') {
147
- throw new TypeError(`mapFn must be a function! Received ${String(mapFn)}`);
148
- }
149
- const transformed = [];
150
- for (const element of this) {
151
- transformed.push(mapFn.call(thisArg, element, NaN, this));
152
- }
153
- return transformed;
154
- },
155
- /**
156
- * Applies a function against an accumulator and each element in the set to
157
- * reduce it to a single value. The function is called with each element of
158
- * the set. Note: Since sets do not have indices, the index parameter is
159
- * always NaN.
160
- *
161
- * @param {Function} reduceFn - The function to execute on each element. It
162
- * receives the accumulator, element, index (always NaN), and the set itself.
163
- * @param {*} initialValue - The initial value to start reducing from.
164
- * @param {Object} [thisArg] - Optional. Value to use as `this` when executing
165
- * `reduceFn`.
166
- * @throws {TypeError} If `reduceFn` is not a function.
167
- * @returns {*} The reduced value.
168
- */
169
- reduce(reduceFn, initialValue, thisArg) {
170
- if (typeof reduceFn !== 'function') {
171
- throw new TypeError(`reduceFn must be a Function! Received ${String(reduceFn)}`);
172
- }
173
- let accumulator = initialValue;
174
- for (const element of this) {
175
- accumulator = reduceFn.call(thisArg, accumulator, element, NaN, this);
176
- }
177
- return accumulator;
178
- },
179
- /**
180
- * Tests whether at least one element in the set passes the test implemented
181
- * by the provided function. The function is called with each element of the
182
- * set. Note: Since sets do not have indices, the index parameter is always NaN.
183
- *
184
- * @param {Function} someFn - The function to test each element. It receives
185
- * the element, index (always NaN), and the set itself.
186
- * @param {Object} [thisArg] - Optional. Value to use as `this` when executing
187
- * `someFn`.
188
- * @throws {TypeError} If `someFn` is not a function.
189
- * @returns {boolean} True if at least one element passes the test, false
190
- * otherwise.
191
- */
192
- some(someFn, thisArg) {
193
- if (typeof someFn !== 'function') {
194
- throw new TypeError(`someFn must be a function! Received ${String(someFn)}`);
195
- }
196
- for (const element of this) {
197
- if (someFn.call(thisArg, element, NaN, this)) {
198
- return true;
92
+ return undefined;
93
+ },
94
+ /**
95
+ * Finds the last element in the set satisfying the provided testing function.
96
+ * If no elements satisfy the testing function, undefined is returned. The
97
+ * function is called with each element of the set in reverse order.
98
+ * Note: Since sets do not have indices, the index parameter is always NaN.
99
+ *
100
+ * @param {Function} findFn - The function to execute on each element. It
101
+ * receives the element, index (always NaN), and the set itself.
102
+ * @param {Object} [thisArg] - Optional. Value to use as `this` when executing
103
+ * `findFn`.
104
+ * @throws {TypeError} If `findFn` is not a function.
105
+ * @returns {*} The last element that satisfies `findFn`, or undefined.
106
+ */
107
+ findLast(findFn, thisArg) {
108
+ if (typeof findFn !== 'function') {
109
+ throw new TypeError(`findFn must be a function! Received ${String(findFn)}`);
110
+ }
111
+ const found = [];
112
+ for (const element of this) {
113
+ const match = findFn.call(thisArg, element, NaN, this);
114
+ if (match) {
115
+ found.push(element);
116
+ }
117
+ }
118
+ if (found.length) {
119
+ return found[found.length - 1];
120
+ }
121
+ return undefined;
122
+ },
123
+ /**
124
+ * A getter property that returns the number of elements in the set.
125
+ * This is an alias for the `size` property of the set.
126
+ *
127
+ * @returns {number} The number of elements in the set.
128
+ */
129
+ get length() {
130
+ return this.size;
131
+ },
132
+ /**
133
+ * Creates a new array populated with the results of calling the provided
134
+ * function on every element in the set. The function is called with each
135
+ * element of the set. Note: Since sets do not have indices, the index
136
+ * parameter is always NaN.
137
+ *
138
+ * @param {Function} mapFn - The function to execute on each element. It
139
+ * receives the element, index (always NaN), and the set itself.
140
+ * @param {Object} [thisArg] - Optional. Value to use as `this` when executing
141
+ * `mapFn`.
142
+ * @throws {TypeError} If `mapFn` is not a function.
143
+ * @returns {Array} A new array with each element being the result of the
144
+ * `mapFn`.
145
+ */
146
+ map(mapFn, thisArg) {
147
+ if (typeof mapFn !== 'function') {
148
+ throw new TypeError(`mapFn must be a function! Received ${String(mapFn)}`);
149
+ }
150
+ const transformed = [];
151
+ for (const element of this) {
152
+ transformed.push(mapFn.call(thisArg, element, NaN, this));
153
+ }
154
+ return transformed;
155
+ },
156
+ /**
157
+ * Applies a function against an accumulator and each element in the set to
158
+ * reduce it to a single value. The function is called with each element of
159
+ * the set. Note: Since sets do not have indices, the index parameter is
160
+ * always NaN.
161
+ *
162
+ * @param {Function} reduceFn - The function to execute on each element. It
163
+ * receives the accumulator, element, index (always NaN), and the set itself.
164
+ * @param {*} initialValue - The initial value to start reducing from.
165
+ * @param {Object} [thisArg] - Optional. Value to use as `this` when executing
166
+ * `reduceFn`.
167
+ * @throws {TypeError} If `reduceFn` is not a function.
168
+ * @returns {*} The reduced value.
169
+ */
170
+ reduce(reduceFn, initialValue, thisArg) {
171
+ if (typeof reduceFn !== 'function') {
172
+ throw new TypeError(`reduceFn must be a Function! Received ${String(reduceFn)}`);
173
+ }
174
+ let accumulator = initialValue;
175
+ for (const element of this) {
176
+ accumulator = reduceFn.call(thisArg, accumulator, element, NaN, this);
177
+ }
178
+ return accumulator;
179
+ },
180
+ /**
181
+ * Tests whether at least one element in the set passes the test implemented
182
+ * by the provided function. The function is called with each element of the
183
+ * set. Note: Since sets do not have indices, the index parameter is always NaN.
184
+ *
185
+ * @param {Function} someFn - The function to test each element. It receives
186
+ * the element, index (always NaN), and the set itself.
187
+ * @param {Object} [thisArg] - Optional. Value to use as `this` when executing
188
+ * `someFn`.
189
+ * @throws {TypeError} If `someFn` is not a function.
190
+ * @returns {boolean} True if at least one element passes the test, false
191
+ * otherwise.
192
+ */
193
+ some(someFn, thisArg) {
194
+ if (typeof someFn !== 'function') {
195
+ throw new TypeError(`someFn must be a function! Received ${String(someFn)}`);
196
+ }
197
+ for (const element of this) {
198
+ if (someFn.call(thisArg, element, NaN, this)) {
199
+ return true;
200
+ }
199
201
  }
200
- }
201
- return false;
202
+ return false;
203
+ },
202
204
  },
203
205
  });
204
206
  //# sourceMappingURL=setextensions.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"setextensions.js","sourceRoot":"","sources":["../../src/setextensions.js"],"names":[],"mappings":";;;AAAA,+CAAwC;AAE3B,QAAA,sBAAsB,GAAG,IAAI,iBAAK,CAAC,GAAG,CAAC,SAAS,EAAE;IAC7D;;;;;;;OAOG;IACH,MAAM,CAAC,GAAG,SAAS;QACjB,KAAK,MAAM,QAAQ,IAAI,SAAS,EAAE,CAAC;YACjC,IACE,OAAO,QAAQ,KAAK,QAAQ;gBAC5B,CAAC,OAAO,CAAC,GAAG,CAAC,QAAQ,EAAE,MAAM,CAAC,QAAQ,CAAC,EACvC,CAAC;gBACD,IAAI,CAAC,GAAG,CAAC,QAAQ,CAAC,CAAA;gBAClB,SAAQ;YACV,CAAC;YAED,KAAK,MAAM,OAAO,IAAI,QAAQ,EAAE,CAAC;gBAC/B,IAAI,CAAC,GAAG,CAAC,OAAO,CAAC,CAAA;YACnB,CAAC;QACH,CAAC;IACH,CAAC;IAED;;;;;;;;;OASG;IACH,QAAQ,CAAC,KAAK;QACZ,KAAK,MAAM,OAAO,IAAI,IAAI,EAAE,CAAC;YAC3B,IAAI,KAAK,IAAI,OAAO,EAAE,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AC,QAAQ,EAAE,YAAY,EAAE,OAAO;YACpC,IAAI,OAAO,QAAQ,KAAK,UAAU,EAAE,CAAC;gBACnC,MAAM,IAAI,SAAS,CACjB,yCAAyC,MAAM,CAAC,QAAQ,CAAC,EAAE,CAC5D,CAAA;YACH,CAAC;YAED,IAAI,WAAW,GAAG,YAAY,CAAA;YAC9B,KAAK,MAAM,OAAO,IAAI,IAAI,EAAE,CAAC;gBAC3B,WAAW,GAAG,QAAQ,CAAC,IAAI,CAAC,OAAO,EAAE,WAAW,EAAE,OAAO,EAAE,GAAG,EAAE,IAAI,CAAC,CAAA;YACvE,CAAC;YAED,OAAO,WAAW,CAAA;QACpB,CAAC;QAED;;;;;;;;;;;;WAYG;QACH,IAAI,CAAC,MAAM,EAAE,OAAO;YAClB,IAAI,OAAO,MAAM,KAAK,UAAU,EAAE,CAAC;gBACjC,MAAM,IAAI,SAAS,CACjB,uCAAuC,MAAM,CAAC,MAAM,CAAC,EAAE,CACxD,CAAA;YACH,CAAC;YAED,KAAK,MAAM,OAAO,IAAI,IAAI,EAAE,CAAC;gBAC3B,IAAI,MAAM,CAAC,IAAI,CAAC,OAAO,EAAE,OAAO,EAAE,GAAG,EAAE,IAAI,CAAC,EAAE,CAAC;oBAC7C,OAAO,IAAI,CAAA;gBACb,CAAC;YACH,CAAC;YAED,OAAO,KAAK,CAAA;QACd,CAAC;KACF;CACF,CAAC,CAAA"}
@@ -82,75 +82,77 @@ exports.StringExtensions = new extension_1.Patch(String, {
82
82
  * making string manipulation tasks more convenient and expressive.
83
83
  */
84
84
  exports.StringPrototypeExtensions = new extension_1.Patch(String.prototype, {
85
- /**
86
- * Extracts a substring from the current string, starting at a given offset
87
- * and bounded by specified opening and closing tokens. This method is
88
- * particularly useful for parsing nested structures or quoted strings,
89
- * where the level of nesting or the presence of escape characters must
90
- * be considered.
91
- *
92
- * @param {number} offset The position in the string from which to start the
93
- * search for the substring.
94
- * @param {[string, string]} tokens An array containing two strings: the
95
- * opening and closing tokens that define the boundaries of the substring
96
- * to be extracted.
97
- * @returns {Object} An object with two properties: `extracted`, the
98
- * extracted substring, and `newOffset`, the position in the original
99
- * string immediately after the end of the extracted substring. If no
100
- * substring is found, `extracted` is `null` and `newOffset` is the same
101
- * as the input offset.
102
- */
103
- extractSubstring(offset = 0, tokens = parenthesisPair) {
104
- let [openToken, closeToken] = tokens;
105
- let depth = 0;
106
- let start = -1;
107
- let end = -1;
108
- let leadingToken = '';
109
- let firstToken = 0;
110
- for (let i = offset; i < this.length; i++) {
111
- const char = this[i];
112
- if (char === openToken) {
113
- depth++;
114
- if (start === -1)
115
- start = i;
116
- }
117
- else if (char === closeToken) {
118
- depth--;
119
- if (depth === 0) {
120
- end = i;
121
- break;
85
+ [extension_1.Patch.kMutablyHidden]: {
86
+ /**
87
+ * Extracts a substring from the current string, starting at a given offset
88
+ * and bounded by specified opening and closing tokens. This method is
89
+ * particularly useful for parsing nested structures or quoted strings,
90
+ * where the level of nesting or the presence of escape characters must
91
+ * be considered.
92
+ *
93
+ * @param {number} offset The position in the string from which to start the
94
+ * search for the substring.
95
+ * @param {[string, string]} tokens An array containing two strings: the
96
+ * opening and closing tokens that define the boundaries of the substring
97
+ * to be extracted.
98
+ * @returns {Object} An object with two properties: `extracted`, the
99
+ * extracted substring, and `newOffset`, the position in the original
100
+ * string immediately after the end of the extracted substring. If no
101
+ * substring is found, `extracted` is `null` and `newOffset` is the same
102
+ * as the input offset.
103
+ */
104
+ extractSubstring(offset = 0, tokens = parenthesisPair) {
105
+ let [openToken, closeToken] = tokens;
106
+ let depth = 0;
107
+ let start = -1;
108
+ let end = -1;
109
+ let leadingToken = '';
110
+ let firstToken = 0;
111
+ for (let i = offset; i < this.length; i++) {
112
+ const char = this[i];
113
+ if (char === openToken) {
114
+ depth++;
115
+ if (start === -1)
116
+ start = i;
117
+ }
118
+ else if (char === closeToken) {
119
+ depth--;
120
+ if (depth === 0) {
121
+ end = i;
122
+ break;
123
+ }
122
124
  }
123
125
  }
124
- }
125
- let lRange = [
126
- Math.max(0, start - 100),
127
- start
128
- ];
129
- let leading = [...this.substring(lRange[0], lRange[1])].reverse().join('');
130
- let reversedLeadingToken;
131
- try {
132
- reversedLeadingToken = /([^ \,\"\'\`]+)/.exec(leading)[1] ?? '';
133
- leadingToken = [...reversedLeadingToken].reverse().join('');
134
- }
135
- catch (ignored) { }
136
- if (start !== -1 && end !== -1) {
137
- const sliceRange = [start, end + 1];
138
- const extracted = this.slice(sliceRange[0], sliceRange[1]);
139
- return {
140
- extracted,
141
- range: [start, end],
142
- newOffset: end + 1,
143
- leadingToken,
144
- };
145
- }
146
- else {
147
- return {
148
- extracted: null,
149
- range: [start, end],
150
- newOffset: offset,
151
- leadingToken,
152
- };
153
- }
126
+ let lRange = [
127
+ Math.max(0, start - 100),
128
+ start
129
+ ];
130
+ let leading = [...this.substring(lRange[0], lRange[1])].reverse().join('');
131
+ let reversedLeadingToken;
132
+ try {
133
+ reversedLeadingToken = /([^ \,\"\'\`]+)/.exec(leading)[1] ?? '';
134
+ leadingToken = [...reversedLeadingToken].reverse().join('');
135
+ }
136
+ catch (ignored) { }
137
+ if (start !== -1 && end !== -1) {
138
+ const sliceRange = [start, end + 1];
139
+ const extracted = this.slice(sliceRange[0], sliceRange[1]);
140
+ return {
141
+ extracted,
142
+ range: [start, end],
143
+ newOffset: end + 1,
144
+ leadingToken,
145
+ };
146
+ }
147
+ else {
148
+ return {
149
+ extracted: null,
150
+ range: [start, end],
151
+ newOffset: offset,
152
+ leadingToken,
153
+ };
154
+ }
155
+ },
154
156
  },
155
157
  });
156
158
  //# sourceMappingURL=stringextensions.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"stringextensions.js","sourceRoot":"","sources":["../../src/stringextensions.js"],"names":[],"mappings":";;;AAAA,+CAAwC;AAExC,MAAM,eAAe,GAAG,CAAC,GAAG,EAAE,GAAG,CAAC,CAAC;AAEnC;;;;;;;GAOG;AACU,QAAA,gBAAgB,GAAG,IAAI,iBAAK,CAAC,MAAM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AAC;QACJ,CAAC;aACI,CAAC;YACJ,OAAO;gBACL,SAAS,EAAE,IAAI;gBACf,KAAK,EAAE,CAAC,KAAK,EAAE,GAAG,CAAC;gBACnB,SAAS,EAAE,MAAM;gBACjB,YAAY;aACb,CAAC;QACJ,CAAC;IACH,CAAC;CACF,CAAC,CAAA"}
1
+ {"version":3,"file":"stringextensions.js","sourceRoot":"","sources":["../../src/stringextensions.js"],"names":[],"mappings":";;;AAAA,+CAAwC;AAExC,MAAM,eAAe,GAAG,CAAC,GAAG,EAAE,GAAG,CAAC,CAAC;AAEnC;;;;;;;GAOG;AACU,QAAA,gBAAgB,GAAG,IAAI,iBAAK,CAAC,MAAM,EAAE;IAChD;;;;;;OAMG;IACH,QAAQ,CAAC,KAAK;QACZ,IAAI,KAAK,IAAI,CAAC,OAAO,KAAK,KAAK,QAAQ,IAAI,KAAK,YAAY,MAAM,CAAC,EAAE,CAAC;YACpE,OAAO,KAAK,CAAC,MAAM,GAAG,CAAC,CAAA;QACzB,CAAC;QACD,OAAO,KAAK,CAAA;IACd,CAAC;IAED;;;;;;;;;OASG;IACH,IAAI,eAAe;QACjB,OAAO,CAAC,GAAG,EAAE,GAAG,CAAC,CAAC;IACpB,CAAC;IAED;;;;;;;;;;OAUG;IACH,IAAI,kBAAkB;QACpB,OAAO,CAAC,GAAG,EAAE,GAAG,CAAC,CAAC;IACpB,CAAC;IAED;;;;;;;;;;;;OAYG;IACH,IAAI,iBAAiB;QACnB,OAAO,CAAC,GAAG,EAAE,GAAG,CAAC,CAAC;IACpB,CAAC;CACF,CAAC,CAAC;AAEH;;;;;;;;;;;GAWG;AACU,QAAA,yBAAyB,GAAG,IAAI,iBAAK,CAAC,MAAM,CAAC,SAAS,EAAE;IACnE,CAAC,iBAAK,CAAC,cAAc,CAAC,EAAE;QACtB;;;;;;;;;;;;;;;;;WAiBG;QACH,gBAAgB,CAAC,MAAM,GAAG,CAAC,EAAE,MAAM,GAAG,eAAe;YACnD,IAAI,CAAC,SAAS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