@cellaware/utils 7.2.4 → 7.2.5
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.
- package/dist/util.d.ts +1 -9
- package/dist/util.js +1 -9
- package/package.json +1 -1
package/dist/util.d.ts
CHANGED
|
@@ -20,17 +20,9 @@ export interface QueryRegexMatch {
|
|
|
20
20
|
stopIdx: number;
|
|
21
21
|
}
|
|
22
22
|
/**
|
|
23
|
-
* Will only
|
|
23
|
+
* Will only return matches that **are not** contained in single quotes,
|
|
24
24
|
* double quotes, single line, or multiline comments.
|
|
25
25
|
*/
|
|
26
26
|
export declare function getQueryMatches(query: string, regex: RegExp): QueryRegexMatch[];
|
|
27
|
-
/**
|
|
28
|
-
* Will only **remove** matches that **are not** contained in single quotes,
|
|
29
|
-
* double quotes, single line, or multiline comments.
|
|
30
|
-
*/
|
|
31
27
|
export declare function removeQueryMatches(query: string, matches: QueryRegexMatch[]): string;
|
|
32
|
-
/**
|
|
33
|
-
* Will only **replace** matches that **are not** contained in single quotes,
|
|
34
|
-
* double quotes, single line, or multiline comments.
|
|
35
|
-
*/
|
|
36
28
|
export declare function replaceQueryMatches(query: string, matches: QueryRegexMatch[], replacement: string): string;
|
package/dist/util.js
CHANGED
|
@@ -73,7 +73,7 @@ export function getCurrentYear(timeZone) {
|
|
|
73
73
|
return date.getFullYear();
|
|
74
74
|
}
|
|
75
75
|
/**
|
|
76
|
-
* Will only
|
|
76
|
+
* Will only return matches that **are not** contained in single quotes,
|
|
77
77
|
* double quotes, single line, or multiline comments.
|
|
78
78
|
*/
|
|
79
79
|
export function getQueryMatches(query, regex) {
|
|
@@ -185,10 +185,6 @@ export function getQueryMatches(query, regex) {
|
|
|
185
185
|
}
|
|
186
186
|
return matches;
|
|
187
187
|
}
|
|
188
|
-
/**
|
|
189
|
-
* Will only **remove** matches that **are not** contained in single quotes,
|
|
190
|
-
* double quotes, single line, or multiline comments.
|
|
191
|
-
*/
|
|
192
188
|
export function removeQueryMatches(query, matches) {
|
|
193
189
|
let adjQuery = query;
|
|
194
190
|
let offset = 0;
|
|
@@ -200,10 +196,6 @@ export function removeQueryMatches(query, matches) {
|
|
|
200
196
|
}
|
|
201
197
|
return adjQuery;
|
|
202
198
|
}
|
|
203
|
-
/**
|
|
204
|
-
* Will only **replace** matches that **are not** contained in single quotes,
|
|
205
|
-
* double quotes, single line, or multiline comments.
|
|
206
|
-
*/
|
|
207
199
|
export function replaceQueryMatches(query, matches, replacement) {
|
|
208
200
|
let adjQuery = query;
|
|
209
201
|
let offset = 0;
|