@nejs/basic-extensions 2.4.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 +5 -4
  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
@@ -1,201 +1,203 @@
1
1
  import { Patch } from '@nejs/extension';
2
2
  export const SetPrototypeExtensions = new Patch(Set.prototype, {
3
- /**
4
- * Merges multiple iterables into the set. Each element from the iterables
5
- * is added to the set, ensuring uniqueness of all elements. This method
6
- * mutates the original set.
7
- *
8
- * @param {...Iterable} iterables - One or more iterable objects (like Set
9
- * or Array) whose elements will be added to the set.
10
- */
11
- concat(...iterables) {
12
- for (const iterable of iterables) {
13
- if (typeof iterable === 'string' ||
14
- !Reflect.has(iterable, Symbol.iterator)) {
15
- this.add(iterable);
16
- continue;
3
+ [Patch.kMutablyHidden]: {
4
+ /**
5
+ * Merges multiple iterables into the set. Each element from the iterables
6
+ * is added to the set, ensuring uniqueness of all elements. This method
7
+ * mutates the original set.
8
+ *
9
+ * @param {...Iterable} iterables - One or more iterable objects (like Set
10
+ * or Array) whose elements will be added to the set.
11
+ */
12
+ concat(...iterables) {
13
+ for (const iterable of iterables) {
14
+ if (typeof iterable === 'string' ||
15
+ !Reflect.has(iterable, Symbol.iterator)) {
16
+ this.add(iterable);
17
+ continue;
18
+ }
19
+ for (const element of iterable) {
20
+ this.add(element);
21
+ }
17
22
  }
18
- for (const element of iterable) {
19
- this.add(element);
23
+ },
24
+ /**
25
+ * Checks to see if any value within the `Set` loosely equals the supplied
26
+ * value.
27
+ *
28
+ * @param {*} value any value that might be loosely equal to an item in the
29
+ * set, as opposed to {@link Set.has} which is the equivalent of a strict or
30
+ * triple equals (`===`) check
31
+ * @returns {boolean} `true` if any value within the set is loosely equal to
32
+ * the supplied value, `false` otherwise
33
+ */
34
+ contains(value) {
35
+ for (const element of this) {
36
+ if (value == element) {
37
+ return true;
38
+ }
20
39
  }
21
- }
22
- },
23
- /**
24
- * Checks to see if any value within the `Set` loosely equals the supplied
25
- * value.
26
- *
27
- * @param {*} value any value that might be loosely equal to an item in the
28
- * set, as opposed to {@link Set.has} which is the equivalent of a strict or
29
- * triple equals (`===`) check
30
- * @returns {boolean} `true` if any value within the set is loosely equal to
31
- * the supplied value, `false` otherwise
32
- */
33
- contains(value) {
34
- for (const element of this) {
35
- if (value == element) {
36
- return true;
40
+ return false;
41
+ },
42
+ /**
43
+ * Checks if every element in the set passes the test implemented by the
44
+ * provided function. The function is called with each element of the set.
45
+ * Note: Since sets do not have indices, the index parameter is always NaN.
46
+ *
47
+ * @param {Function} everyFn - The function to test each element. Receives
48
+ * the element, index (always NaN), and the set itself.
49
+ * @param {Object} [thisArg] - Optional. Value to use as `this` when executing
50
+ * `everyFn`.
51
+ * @throws {TypeError} If `everyFn` is not a function.
52
+ * @returns {boolean} True if every element passes the test, false otherwise.
53
+ */
54
+ every(everyFn, thisArg) {
55
+ if (typeof everyFn !== 'function') {
56
+ throw new TypeError(`everyFn must be a function! Received ${String(everyFn)}`);
37
57
  }
38
- }
39
- return false;
40
- },
41
- /**
42
- * Checks if every element in the set passes the test implemented by the
43
- * provided function. The function is called with each element of the set.
44
- * Note: Since sets do not have indices, the index parameter is always NaN.
45
- *
46
- * @param {Function} everyFn - The function to test each element. Receives
47
- * the element, index (always NaN), and the set itself.
48
- * @param {Object} [thisArg] - Optional. Value to use as `this` when executing
49
- * `everyFn`.
50
- * @throws {TypeError} If `everyFn` is not a function.
51
- * @returns {boolean} True if every element passes the test, false otherwise.
52
- */
53
- every(everyFn, thisArg) {
54
- if (typeof everyFn !== 'function') {
55
- throw new TypeError(`everyFn must be a function! Received ${String(everyFn)}`);
56
- }
57
- let found = 0;
58
- for (const element of this) {
59
- if (everyFn.call(thisArg, element, NaN, this)) {
60
- found++;
58
+ let found = 0;
59
+ for (const element of this) {
60
+ if (everyFn.call(thisArg, element, NaN, this)) {
61
+ found++;
62
+ }
61
63
  }
62
- }
63
- return (found === this.size);
64
- },
65
- /**
66
- * Finds the first element in the set satisfying the provided testing
67
- * function. If no elements satisfy the testing function, undefined is
68
- * returned. The function is called with each element of the set.
69
- * Note: Since sets do not have indices, the index parameter is always NaN.
70
- *
71
- * @param {Function} findFn - The function to execute on each element. It
72
- * receives the element, index (always NaN), and the set itself.
73
- * @param {Object} [thisArg] - Optional. Value to use as `this` when executing
74
- * `findFn`.
75
- * @throws {TypeError} If `findFn` is not a function.
76
- * @returns {*} The first element that satisfies `findFn`, or undefined.
77
- */
78
- find(findFn, thisArg) {
79
- if (typeof findFn !== 'function') {
80
- throw new TypeError(`findFn must be a function! Received ${String(findFn)}`);
81
- }
82
- for (const element of this) {
83
- const match = findFn.call(thisArg, element, NaN, this);
84
- if (match) {
85
- return element;
64
+ return (found === this.size);
65
+ },
66
+ /**
67
+ * Finds the first element in the set satisfying the provided testing
68
+ * function. If no elements satisfy the testing function, undefined is
69
+ * returned. The function is called with each element of the set.
70
+ * Note: Since sets do not have indices, the index parameter is always NaN.
71
+ *
72
+ * @param {Function} findFn - The function to execute on each element. It
73
+ * receives the element, index (always NaN), and the set itself.
74
+ * @param {Object} [thisArg] - Optional. Value to use as `this` when executing
75
+ * `findFn`.
76
+ * @throws {TypeError} If `findFn` is not a function.
77
+ * @returns {*} The first element that satisfies `findFn`, or undefined.
78
+ */
79
+ find(findFn, thisArg) {
80
+ if (typeof findFn !== 'function') {
81
+ throw new TypeError(`findFn must be a function! Received ${String(findFn)}`);
86
82
  }
87
- }
88
- return undefined;
89
- },
90
- /**
91
- * Finds the last element in the set satisfying the provided testing function.
92
- * If no elements satisfy the testing function, undefined is returned. The
93
- * function is called with each element of the set in reverse order.
94
- * Note: Since sets do not have indices, the index parameter is always NaN.
95
- *
96
- * @param {Function} findFn - The function to execute on each element. It
97
- * receives the element, index (always NaN), and the set itself.
98
- * @param {Object} [thisArg] - Optional. Value to use as `this` when executing
99
- * `findFn`.
100
- * @throws {TypeError} If `findFn` is not a function.
101
- * @returns {*} The last element that satisfies `findFn`, or undefined.
102
- */
103
- findLast(findFn, thisArg) {
104
- if (typeof findFn !== 'function') {
105
- throw new TypeError(`findFn must be a function! Received ${String(findFn)}`);
106
- }
107
- const found = [];
108
- for (const element of this) {
109
- const match = findFn.call(thisArg, element, NaN, this);
110
- if (match) {
111
- found.push(element);
83
+ for (const element of this) {
84
+ const match = findFn.call(thisArg, element, NaN, this);
85
+ if (match) {
86
+ return element;
87
+ }
112
88
  }
113
- }
114
- if (found.length) {
115
- return found[found.length - 1];
116
- }
117
- return undefined;
118
- },
119
- /**
120
- * A getter property that returns the number of elements in the set.
121
- * This is an alias for the `size` property of the set.
122
- *
123
- * @returns {number} The number of elements in the set.
124
- */
125
- get length() {
126
- return this.size;
127
- },
128
- /**
129
- * Creates a new array populated with the results of calling the provided
130
- * function on every element in the set. The function is called with each
131
- * element of the set. Note: Since sets do not have indices, the index
132
- * parameter is always NaN.
133
- *
134
- * @param {Function} mapFn - The function to execute on each element. It
135
- * receives the element, index (always NaN), and the set itself.
136
- * @param {Object} [thisArg] - Optional. Value to use as `this` when executing
137
- * `mapFn`.
138
- * @throws {TypeError} If `mapFn` is not a function.
139
- * @returns {Array} A new array with each element being the result of the
140
- * `mapFn`.
141
- */
142
- map(mapFn, thisArg) {
143
- if (typeof mapFn !== 'function') {
144
- throw new TypeError(`mapFn must be a function! Received ${String(mapFn)}`);
145
- }
146
- const transformed = [];
147
- for (const element of this) {
148
- transformed.push(mapFn.call(thisArg, element, NaN, this));
149
- }
150
- return transformed;
151
- },
152
- /**
153
- * Applies a function against an accumulator and each element in the set to
154
- * reduce it to a single value. The function is called with each element of
155
- * the set. Note: Since sets do not have indices, the index parameter is
156
- * always NaN.
157
- *
158
- * @param {Function} reduceFn - The function to execute on each element. It
159
- * receives the accumulator, element, index (always NaN), and the set itself.
160
- * @param {*} initialValue - The initial value to start reducing from.
161
- * @param {Object} [thisArg] - Optional. Value to use as `this` when executing
162
- * `reduceFn`.
163
- * @throws {TypeError} If `reduceFn` is not a function.
164
- * @returns {*} The reduced value.
165
- */
166
- reduce(reduceFn, initialValue, thisArg) {
167
- if (typeof reduceFn !== 'function') {
168
- throw new TypeError(`reduceFn must be a Function! Received ${String(reduceFn)}`);
169
- }
170
- let accumulator = initialValue;
171
- for (const element of this) {
172
- accumulator = reduceFn.call(thisArg, accumulator, element, NaN, this);
173
- }
174
- return accumulator;
175
- },
176
- /**
177
- * Tests whether at least one element in the set passes the test implemented
178
- * by the provided function. The function is called with each element of the
179
- * set. Note: Since sets do not have indices, the index parameter is always NaN.
180
- *
181
- * @param {Function} someFn - The function to test each element. It receives
182
- * the element, index (always NaN), and the set itself.
183
- * @param {Object} [thisArg] - Optional. Value to use as `this` when executing
184
- * `someFn`.
185
- * @throws {TypeError} If `someFn` is not a function.
186
- * @returns {boolean} True if at least one element passes the test, false
187
- * otherwise.
188
- */
189
- some(someFn, thisArg) {
190
- if (typeof someFn !== 'function') {
191
- throw new TypeError(`someFn must be a function! Received ${String(someFn)}`);
192
- }
193
- for (const element of this) {
194
- if (someFn.call(thisArg, element, NaN, this)) {
195
- return true;
89
+ return undefined;
90
+ },
91
+ /**
92
+ * Finds the last element in the set satisfying the provided testing function.
93
+ * If no elements satisfy the testing function, undefined is returned. The
94
+ * function is called with each element of the set in reverse order.
95
+ * Note: Since sets do not have indices, the index parameter is always NaN.
96
+ *
97
+ * @param {Function} findFn - The function to execute on each element. It
98
+ * receives the element, index (always NaN), and the set itself.
99
+ * @param {Object} [thisArg] - Optional. Value to use as `this` when executing
100
+ * `findFn`.
101
+ * @throws {TypeError} If `findFn` is not a function.
102
+ * @returns {*} The last element that satisfies `findFn`, or undefined.
103
+ */
104
+ findLast(findFn, thisArg) {
105
+ if (typeof findFn !== 'function') {
106
+ throw new TypeError(`findFn must be a function! Received ${String(findFn)}`);
107
+ }
108
+ const found = [];
109
+ for (const element of this) {
110
+ const match = findFn.call(thisArg, element, NaN, this);
111
+ if (match) {
112
+ found.push(element);
113
+ }
114
+ }
115
+ if (found.length) {
116
+ return found[found.length - 1];
117
+ }
118
+ return undefined;
119
+ },
120
+ /**
121
+ * A getter property that returns the number of elements in the set.
122
+ * This is an alias for the `size` property of the set.
123
+ *
124
+ * @returns {number} The number of elements in the set.
125
+ */
126
+ get length() {
127
+ return this.size;
128
+ },
129
+ /**
130
+ * Creates a new array populated with the results of calling the provided
131
+ * function on every element in the set. The function is called with each
132
+ * element of the set. Note: Since sets do not have indices, the index
133
+ * parameter is always NaN.
134
+ *
135
+ * @param {Function} mapFn - The function to execute on each element. It
136
+ * receives the element, index (always NaN), and the set itself.
137
+ * @param {Object} [thisArg] - Optional. Value to use as `this` when executing
138
+ * `mapFn`.
139
+ * @throws {TypeError} If `mapFn` is not a function.
140
+ * @returns {Array} A new array with each element being the result of the
141
+ * `mapFn`.
142
+ */
143
+ map(mapFn, thisArg) {
144
+ if (typeof mapFn !== 'function') {
145
+ throw new TypeError(`mapFn must be a function! Received ${String(mapFn)}`);
146
+ }
147
+ const transformed = [];
148
+ for (const element of this) {
149
+ transformed.push(mapFn.call(thisArg, element, NaN, this));
150
+ }
151
+ return transformed;
152
+ },
153
+ /**
154
+ * Applies a function against an accumulator and each element in the set to
155
+ * reduce it to a single value. The function is called with each element of
156
+ * the set. Note: Since sets do not have indices, the index parameter is
157
+ * always NaN.
158
+ *
159
+ * @param {Function} reduceFn - The function to execute on each element. It
160
+ * receives the accumulator, element, index (always NaN), and the set itself.
161
+ * @param {*} initialValue - The initial value to start reducing from.
162
+ * @param {Object} [thisArg] - Optional. Value to use as `this` when executing
163
+ * `reduceFn`.
164
+ * @throws {TypeError} If `reduceFn` is not a function.
165
+ * @returns {*} The reduced value.
166
+ */
167
+ reduce(reduceFn, initialValue, thisArg) {
168
+ if (typeof reduceFn !== 'function') {
169
+ throw new TypeError(`reduceFn must be a Function! Received ${String(reduceFn)}`);
170
+ }
171
+ let accumulator = initialValue;
172
+ for (const element of this) {
173
+ accumulator = reduceFn.call(thisArg, accumulator, element, NaN, this);
174
+ }
175
+ return accumulator;
176
+ },
177
+ /**
178
+ * Tests whether at least one element in the set passes the test implemented
179
+ * by the provided function. The function is called with each element of the
180
+ * set. Note: Since sets do not have indices, the index parameter is always NaN.
181
+ *
182
+ * @param {Function} someFn - The function to test each element. It receives
183
+ * the element, index (always NaN), and the set itself.
184
+ * @param {Object} [thisArg] - Optional. Value to use as `this` when executing
185
+ * `someFn`.
186
+ * @throws {TypeError} If `someFn` is not a function.
187
+ * @returns {boolean} True if at least one element passes the test, false
188
+ * otherwise.
189
+ */
190
+ some(someFn, thisArg) {
191
+ if (typeof someFn !== 'function') {
192
+ throw new TypeError(`someFn must be a function! Received ${String(someFn)}`);
193
+ }
194
+ for (const element of this) {
195
+ if (someFn.call(thisArg, element, NaN, this)) {
196
+ return true;
197
+ }
196
198
  }
197
- }
198
- return false;
199
+ return false;
200
+ },
199
201
  },
200
202
  });
201
203
  //# sourceMappingURL=setextensions.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"setextensions.js","sourceRoot":"","sources":["../../src/setextensions.js"],"names":[],"mappings":"AAAA,OAAO,EAAE,KAAK,EAAE,MAAM,iBAAiB,CAAC;AAExC,MAAM,CAAC,MAAM,sBAAsB,GAAG,IAAI,KAAK,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,CAAC;gBACrB,OAAO,IAAI,CAAA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ACH,MAAM,CAAC,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"}
@@ -79,75 +79,77 @@ export const StringExtensions = new Patch(String, {
79
79
  * making string manipulation tasks more convenient and expressive.
80
80
  */
81
81
  export const StringPrototypeExtensions = new Patch(String.prototype, {
82
- /**
83
- * Extracts a substring from the current string, starting at a given offset
84
- * and bounded by specified opening and closing tokens. This method is
85
- * particularly useful for parsing nested structures or quoted strings,
86
- * where the level of nesting or the presence of escape characters must
87
- * be considered.
88
- *
89
- * @param {number} offset The position in the string from which to start the
90
- * search for the substring.
91
- * @param {[string, string]} tokens An array containing two strings: the
92
- * opening and closing tokens that define the boundaries of the substring
93
- * to be extracted.
94
- * @returns {Object} An object with two properties: `extracted`, the
95
- * extracted substring, and `newOffset`, the position in the original
96
- * string immediately after the end of the extracted substring. If no
97
- * substring is found, `extracted` is `null` and `newOffset` is the same
98
- * as the input offset.
99
- */
100
- extractSubstring(offset = 0, tokens = parenthesisPair) {
101
- let [openToken, closeToken] = tokens;
102
- let depth = 0;
103
- let start = -1;
104
- let end = -1;
105
- let leadingToken = '';
106
- let firstToken = 0;
107
- for (let i = offset; i < this.length; i++) {
108
- const char = this[i];
109
- if (char === openToken) {
110
- depth++;
111
- if (start === -1)
112
- start = i;
113
- }
114
- else if (char === closeToken) {
115
- depth--;
116
- if (depth === 0) {
117
- end = i;
118
- break;
82
+ [Patch.kMutablyHidden]: {
83
+ /**
84
+ * Extracts a substring from the current string, starting at a given offset
85
+ * and bounded by specified opening and closing tokens. This method is
86
+ * particularly useful for parsing nested structures or quoted strings,
87
+ * where the level of nesting or the presence of escape characters must
88
+ * be considered.
89
+ *
90
+ * @param {number} offset The position in the string from which to start the
91
+ * search for the substring.
92
+ * @param {[string, string]} tokens An array containing two strings: the
93
+ * opening and closing tokens that define the boundaries of the substring
94
+ * to be extracted.
95
+ * @returns {Object} An object with two properties: `extracted`, the
96
+ * extracted substring, and `newOffset`, the position in the original
97
+ * string immediately after the end of the extracted substring. If no
98
+ * substring is found, `extracted` is `null` and `newOffset` is the same
99
+ * as the input offset.
100
+ */
101
+ extractSubstring(offset = 0, tokens = parenthesisPair) {
102
+ let [openToken, closeToken] = tokens;
103
+ let depth = 0;
104
+ let start = -1;
105
+ let end = -1;
106
+ let leadingToken = '';
107
+ let firstToken = 0;
108
+ for (let i = offset; i < this.length; i++) {
109
+ const char = this[i];
110
+ if (char === openToken) {
111
+ depth++;
112
+ if (start === -1)
113
+ start = i;
114
+ }
115
+ else if (char === closeToken) {
116
+ depth--;
117
+ if (depth === 0) {
118
+ end = i;
119
+ break;
120
+ }
119
121
  }
120
122
  }
121
- }
122
- let lRange = [
123
- Math.max(0, start - 100),
124
- start
125
- ];
126
- let leading = [...this.substring(lRange[0], lRange[1])].reverse().join('');
127
- let reversedLeadingToken;
128
- try {
129
- reversedLeadingToken = /([^ \,\"\'\`]+)/.exec(leading)[1] ?? '';
130
- leadingToken = [...reversedLeadingToken].reverse().join('');
131
- }
132
- catch (ignored) { }
133
- if (start !== -1 && end !== -1) {
134
- const sliceRange = [start, end + 1];
135
- const extracted = this.slice(sliceRange[0], sliceRange[1]);
136
- return {
137
- extracted,
138
- range: [start, end],
139
- newOffset: end + 1,
140
- leadingToken,
141
- };
142
- }
143
- else {
144
- return {
145
- extracted: null,
146
- range: [start, end],
147
- newOffset: offset,
148
- leadingToken,
149
- };
150
- }
123
+ let lRange = [
124
+ Math.max(0, start - 100),
125
+ start
126
+ ];
127
+ let leading = [...this.substring(lRange[0], lRange[1])].reverse().join('');
128
+ let reversedLeadingToken;
129
+ try {
130
+ reversedLeadingToken = /([^ \,\"\'\`]+)/.exec(leading)[1] ?? '';
131
+ leadingToken = [...reversedLeadingToken].reverse().join('');
132
+ }
133
+ catch (ignored) { }
134
+ if (start !== -1 && end !== -1) {
135
+ const sliceRange = [start, end + 1];
136
+ const extracted = this.slice(sliceRange[0], sliceRange[1]);
137
+ return {
138
+ extracted,
139
+ range: [start, end],
140
+ newOffset: end + 1,
141
+ leadingToken,
142
+ };
143
+ }
144
+ else {
145
+ return {
146
+ extracted: null,
147
+ range: [start, end],
148
+ newOffset: offset,
149
+ leadingToken,
150
+ };
151
+ }
152
+ },
151
153
  },
152
154
  });
153
155
  //# sourceMappingURL=stringextensions.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"stringextensions.js","sourceRoot":"","sources":["../../src/stringextensions.js"],"names":[],"mappings":"AAAA,OAAO,EAAE,KAAK,EAAE,MAAM,iBAAiB,CAAC;AAExC,MAAM,eAAe,GAAG,CAAC,GAAG,EAAE,GAAG,CAAC,CAAC;AAEnC;;;;;;;GAOG;AACH,MAAM,CAAC,MAAM,g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AS,EAAE,GAAG,GAAG,CAAC;gBAClB,YAAY;aACb,CAAC;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,OAAO,EAAE,KAAK,EAAE,MAAM,iBAAiB,CAAC;AAExC,MAAM,eAAe,GAAG,CAAC,GAAG,EAAE,GAAG,CAAC,CAAC;AAEnC;;;;;;;GAOG;AACH,MAAM,CAAC,MAAM,gBAAgB,GAAG,IAAI,KAAK,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;AACH,MAAM,CAAC,MAAM,yBAAyB,GAAG,IAAI,KAAK,CAAC,MAAM,CAAC,SAAS,EAAE;IACnE,CAAC,KAAK,CAAC,cAAc,CAAC,EAAE;QACtB;;;;;;;;;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