@fuzdev/fuz_util 0.45.2 → 0.46.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.
- package/dist/array.d.ts +1 -1
- package/dist/array.js +1 -1
- package/dist/async.d.ts +18 -0
- package/dist/async.d.ts.map +1 -1
- package/dist/async.js +63 -3
- package/dist/dom.d.ts +2 -2
- package/dist/dom.js +2 -2
- package/dist/fetch.d.ts +1 -1
- package/dist/fetch.js +1 -1
- package/dist/git.d.ts.map +1 -1
- package/dist/git.js +10 -10
- package/dist/path.d.ts +1 -1
- package/dist/path.js +2 -2
- package/dist/print.d.ts +1 -1
- package/dist/print.js +1 -1
- package/dist/process.d.ts +303 -43
- package/dist/process.d.ts.map +1 -1
- package/dist/process.js +475 -108
- package/dist/random.d.ts +1 -1
- package/dist/random.js +1 -1
- package/dist/regexp.d.ts +1 -1
- package/dist/regexp.js +1 -1
- package/package.json +6 -5
- package/src/lib/array.ts +1 -1
- package/src/lib/async.ts +72 -3
- package/src/lib/dom.ts +2 -2
- package/src/lib/fetch.ts +1 -1
- package/src/lib/git.ts +20 -10
- package/src/lib/path.ts +2 -2
- package/src/lib/print.ts +1 -1
- package/src/lib/process.ts +681 -135
- package/src/lib/random.ts +1 -1
- package/src/lib/regexp.ts +1 -1
package/src/lib/random.ts
CHANGED
|
@@ -29,7 +29,7 @@ export const random_item = <T extends ReadonlyArray<any>>(
|
|
|
29
29
|
|
|
30
30
|
/**
|
|
31
31
|
* Mutates `array` with random ordering.
|
|
32
|
-
* @mutates array randomly reorders elements in place using Fisher-Yates shuffle
|
|
32
|
+
* @mutates array - randomly reorders elements in place using Fisher-Yates shuffle
|
|
33
33
|
*/
|
|
34
34
|
export const shuffle: <T extends Array<any>>(array: T, random?: typeof random_int) => T = (
|
|
35
35
|
array,
|
package/src/lib/regexp.ts
CHANGED
|
@@ -7,7 +7,7 @@ export const escape_regexp = (str: string): string => str.replace(/[.*+?^${}()|[
|
|
|
7
7
|
/**
|
|
8
8
|
* Reset a RegExp's lastIndex to 0 for global and sticky patterns.
|
|
9
9
|
* Ensures consistent behavior by clearing state that affects subsequent matches.
|
|
10
|
-
* @mutates regexp sets lastIndex to 0 if regexp is global or sticky
|
|
10
|
+
* @mutates regexp - sets lastIndex to 0 if regexp is global or sticky
|
|
11
11
|
*/
|
|
12
12
|
export const reset_regexp = <T extends RegExp>(regexp: T): T => {
|
|
13
13
|
if (regexp.global || regexp.sticky) {
|