@isdk/util 0.3.4 → 0.3.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/index.d.mts +111 -1
- package/dist/index.d.ts +111 -1
- package/dist/index.js +1 -1
- package/dist/index.mjs +1 -1
- package/docs/classes/BinarySemaphore.md +25 -25
- package/docs/classes/ConfigFile.md +6 -6
- package/docs/classes/Deque.md +13 -13
- package/docs/classes/IntSet.md +12 -12
- package/docs/classes/Semaphore.md +26 -26
- package/docs/classes/SignalGate.md +9 -9
- package/docs/functions/RateLimit.md +1 -1
- package/docs/functions/arrayHasAll.md +1 -1
- package/docs/functions/extNameLevel.md +1 -1
- package/docs/functions/filenameReservedRegex.md +1 -1
- package/docs/functions/findPort.md +1 -1
- package/docs/functions/getMultiLevelExtname.md +1 -1
- package/docs/functions/glob.md +1 -1
- package/docs/functions/isStringIn.md +1 -1
- package/docs/functions/isValidFilename.md +1 -1
- package/docs/functions/isValidFilepath.md +1 -1
- package/docs/functions/normalizeIncludeFiles.md +1 -1
- package/docs/functions/omitDeepBy.md +125 -0
- package/docs/functions/omitEmptyDeep.md +47 -0
- package/docs/functions/parseFrontMatter.md +1 -1
- package/docs/functions/parseYaml.md +1 -1
- package/docs/functions/reControlCharsRegex.md +1 -1
- package/docs/functions/registerYamlTag.md +1 -1
- package/docs/functions/removeLeadingEmptyLines.md +1 -1
- package/docs/functions/sanitizeFilename.md +1 -1
- package/docs/functions/sanitizeFilepath.md +1 -1
- package/docs/functions/sleep.md +1 -1
- package/docs/functions/stringifyYaml.md +1 -1
- package/docs/functions/toCamelCase.md +1 -1
- package/docs/functions/toCapitalCase.md +1 -1
- package/docs/functions/toPascalCase.md +1 -1
- package/docs/functions/traverseFolder.md +1 -1
- package/docs/functions/traverseFolderSync.md +1 -1
- package/docs/functions/yieldExec.md +1 -1
- package/docs/globals.md +2 -0
- package/docs/interfaces/BinarySemaphoreAcquireOptions.md +2 -2
- package/docs/interfaces/BinarySemaphoreOptions.md +5 -5
- package/docs/interfaces/BinarySemaphoreReleaseOptions.md +2 -2
- package/docs/interfaces/BinarySemaphoreReleaserFunc.md +3 -3
- package/docs/interfaces/IncludeFiles.md +3 -3
- package/docs/interfaces/LoadConfigFileOptions.md +3 -3
- package/docs/interfaces/SanitizeFilenameOptions.md +3 -3
- package/docs/interfaces/SemaphoreOptions.md +7 -7
- package/docs/interfaces/SemaphoreTaskItem.md +5 -5
- package/docs/type-aliases/SemaphoreIsReadyFuncType.md +1 -1
- package/docs/type-aliases/StringifyFunc.md +1 -1
- package/docs/type-aliases/TraverseFolderHandler.md +1 -1
- package/docs/type-aliases/TraverseFolderSyncHandler.md +1 -1
- package/docs/variables/DefaultAllTextFiles.md +1 -1
- package/docs/variables/DefaultAsyncSemaphoreCapacity.md +1 -1
- package/docs/variables/FilenameReservedRegex.md +1 -1
- package/docs/variables/WindowsReservedNameRegex.md +1 -1
- package/package.json +7 -5
package/docs/functions/glob.md
CHANGED
|
@@ -8,7 +8,7 @@
|
|
|
8
8
|
|
|
9
9
|
> **glob**(`filepath`, `pattern`, `rootDir?`): `boolean` \| `undefined`
|
|
10
10
|
|
|
11
|
-
Defined in: [src/glob.ts:29](https://github.com/isdk/util.js/blob/
|
|
11
|
+
Defined in: [src/glob.ts:29](https://github.com/isdk/util.js/blob/40caefda2d376f288af37d8babc9da0357d94056/src/glob.ts#L29)
|
|
12
12
|
|
|
13
13
|
Matches a file path against a list of glob patterns.
|
|
14
14
|
|
|
@@ -8,7 +8,7 @@
|
|
|
8
8
|
|
|
9
9
|
> **isStringIn**(`str`, `arr`): `boolean`
|
|
10
10
|
|
|
11
|
-
Defined in: [src/is-string-in.ts:17](https://github.com/isdk/util.js/blob/
|
|
11
|
+
Defined in: [src/is-string-in.ts:17](https://github.com/isdk/util.js/blob/40caefda2d376f288af37d8babc9da0357d94056/src/is-string-in.ts#L17)
|
|
12
12
|
|
|
13
13
|
Checks if a given string exists within an array of strings or a single string.
|
|
14
14
|
|
|
@@ -8,7 +8,7 @@
|
|
|
8
8
|
|
|
9
9
|
> **isValidFilename**(`filename`): `boolean` \| `""`
|
|
10
10
|
|
|
11
|
-
Defined in: [src/filename.ts:63](https://github.com/isdk/util.js/blob/
|
|
11
|
+
Defined in: [src/filename.ts:63](https://github.com/isdk/util.js/blob/40caefda2d376f288af37d8babc9da0357d94056/src/filename.ts#L63)
|
|
12
12
|
|
|
13
13
|
Validates if a given string is a valid filename.
|
|
14
14
|
|
|
@@ -8,7 +8,7 @@
|
|
|
8
8
|
|
|
9
9
|
> **isValidFilepath**(`filepath`): `boolean`
|
|
10
10
|
|
|
11
|
-
Defined in: [src/filename.ts:72](https://github.com/isdk/util.js/blob/
|
|
11
|
+
Defined in: [src/filename.ts:72](https://github.com/isdk/util.js/blob/40caefda2d376f288af37d8babc9da0357d94056/src/filename.ts#L72)
|
|
12
12
|
|
|
13
13
|
Validates whether the given filepath is valid.
|
|
14
14
|
|
|
@@ -8,7 +8,7 @@
|
|
|
8
8
|
|
|
9
9
|
> **normalizeIncludeFiles**(`files?`, `defaultFiles?`): `string`[]
|
|
10
10
|
|
|
11
|
-
Defined in: [src/include-files.ts:34](https://github.com/isdk/util.js/blob/
|
|
11
|
+
Defined in: [src/include-files.ts:34](https://github.com/isdk/util.js/blob/40caefda2d376f288af37d8babc9da0357d94056/src/include-files.ts#L34)
|
|
12
12
|
|
|
13
13
|
Normalizes a list of file patterns for glob matching.
|
|
14
14
|
|
|
@@ -0,0 +1,125 @@
|
|
|
1
|
+
[**@isdk/util**](../README.md)
|
|
2
|
+
|
|
3
|
+
***
|
|
4
|
+
|
|
5
|
+
[@isdk/util](../globals.md) / omitDeepBy
|
|
6
|
+
|
|
7
|
+
# Function: omitDeepBy()
|
|
8
|
+
|
|
9
|
+
> **omitDeepBy**\<`T`\>(`value`, `predicate`, `cache`): `any`
|
|
10
|
+
|
|
11
|
+
Defined in: [src/omit-deep-by.ts:92](https://github.com/isdk/util.js/blob/40caefda2d376f288af37d8babc9da0357d94056/src/omit-deep-by.ts#L92)
|
|
12
|
+
|
|
13
|
+
Recursively removes properties from an object or array that satisfy the given predicate condition.
|
|
14
|
+
|
|
15
|
+
This function traverses the input value deeply and omits any property or element that causes the
|
|
16
|
+
predicate function to return `true`. The operation is performed recursively on nested objects and arrays.
|
|
17
|
+
|
|
18
|
+
For arrays:
|
|
19
|
+
- Each element is processed recursively through omitDeepBy
|
|
20
|
+
- Elements that satisfy the predicate are filtered out
|
|
21
|
+
- If the resulting array is empty, returns `undefined`
|
|
22
|
+
|
|
23
|
+
For plain objects:
|
|
24
|
+
- Each property is processed recursively through omitDeepBy
|
|
25
|
+
- Properties that satisfy the predicate are omitted
|
|
26
|
+
- Supports both string and symbol keys via `Reflect.ownKeys`
|
|
27
|
+
- If the resulting object is empty, returns `undefined`
|
|
28
|
+
|
|
29
|
+
For primitive values:
|
|
30
|
+
- Returns the value unchanged
|
|
31
|
+
|
|
32
|
+
Special handling:
|
|
33
|
+
- Circular references are properly handled using a WeakMap cache
|
|
34
|
+
- Non-plain objects (Date, RegExp, etc.) are preserved as-is
|
|
35
|
+
- Empty results (after filtering) return `undefined`
|
|
36
|
+
|
|
37
|
+
## Type Parameters
|
|
38
|
+
|
|
39
|
+
### T
|
|
40
|
+
|
|
41
|
+
`T`
|
|
42
|
+
|
|
43
|
+
The type of the input value
|
|
44
|
+
|
|
45
|
+
## Parameters
|
|
46
|
+
|
|
47
|
+
### value
|
|
48
|
+
|
|
49
|
+
`T`
|
|
50
|
+
|
|
51
|
+
The data structure to process. Can be any type including objects, arrays, or primitives.
|
|
52
|
+
|
|
53
|
+
### predicate
|
|
54
|
+
|
|
55
|
+
(`v`, `k`) => `boolean`
|
|
56
|
+
|
|
57
|
+
A function that determines whether a property should be removed.
|
|
58
|
+
The function receives two parameters:
|
|
59
|
+
- `v`: The current value being evaluated
|
|
60
|
+
- `k`: The key/index of the current value in its parent container
|
|
61
|
+
Returns `true` to indicate the item should be removed, `false` to keep it.
|
|
62
|
+
|
|
63
|
+
### cache
|
|
64
|
+
|
|
65
|
+
`WeakMap`\<`object`, `any`\> = `...`
|
|
66
|
+
|
|
67
|
+
Internal WeakMap for handling circular references. Should not be provided by callers.
|
|
68
|
+
|
|
69
|
+
## Returns
|
|
70
|
+
|
|
71
|
+
`any`
|
|
72
|
+
|
|
73
|
+
A new data structure with matching properties removed, or `undefined` if the result would be empty.
|
|
74
|
+
The returned type matches the input type but with some properties potentially omitted.
|
|
75
|
+
|
|
76
|
+
## Examples
|
|
77
|
+
|
|
78
|
+
```ts
|
|
79
|
+
// Remove all null and undefined values
|
|
80
|
+
const obj = { a: 1, b: null, c: { d: undefined, e: 2 } };
|
|
81
|
+
const result = omitDeepBy(obj, (v) => v == null);
|
|
82
|
+
// Result: { a: 1, c: { e: 2 } }
|
|
83
|
+
```
|
|
84
|
+
|
|
85
|
+
```ts
|
|
86
|
+
// Remove array elements with specific value
|
|
87
|
+
const arr = [1, 2, null, 3, undefined];
|
|
88
|
+
const result = omitDeepBy(arr, (v) => v == null);
|
|
89
|
+
// Result: [1, 2, 3]
|
|
90
|
+
```
|
|
91
|
+
|
|
92
|
+
```ts
|
|
93
|
+
// Remove properties based on custom conditions
|
|
94
|
+
const data = {
|
|
95
|
+
name: 'John',
|
|
96
|
+
age: 0,
|
|
97
|
+
address: {
|
|
98
|
+
street: '',
|
|
99
|
+
city: 'NYC',
|
|
100
|
+
zip: null
|
|
101
|
+
},
|
|
102
|
+
hobbies: ['reading', '', 'swimming']
|
|
103
|
+
};
|
|
104
|
+
|
|
105
|
+
const cleaned = omitDeepBy(data, (value, key) => {
|
|
106
|
+
// Remove falsy values except 0 and false
|
|
107
|
+
if (key === 'age') return false; // Keep age even if 0
|
|
108
|
+
return !value && value !== 0 && value !== false;
|
|
109
|
+
});
|
|
110
|
+
|
|
111
|
+
// Result: {
|
|
112
|
+
// name: 'John',
|
|
113
|
+
// age: 0,
|
|
114
|
+
// address: { city: 'NYC' },
|
|
115
|
+
// hobbies: ['reading', 'swimming']
|
|
116
|
+
// }
|
|
117
|
+
```
|
|
118
|
+
|
|
119
|
+
```ts
|
|
120
|
+
// Handle circular references safely
|
|
121
|
+
const circular: any = { a: 1 };
|
|
122
|
+
circular.self = circular;
|
|
123
|
+
const result = omitDeepBy(circular, (v) => v === 1);
|
|
124
|
+
// Result: { self: [Circular] } where self points to the same object
|
|
125
|
+
```
|
|
@@ -0,0 +1,47 @@
|
|
|
1
|
+
[**@isdk/util**](../README.md)
|
|
2
|
+
|
|
3
|
+
***
|
|
4
|
+
|
|
5
|
+
[@isdk/util](../globals.md) / omitEmptyDeep
|
|
6
|
+
|
|
7
|
+
# Function: omitEmptyDeep()
|
|
8
|
+
|
|
9
|
+
> **omitEmptyDeep**\<`T`\>(`value`): `any`
|
|
10
|
+
|
|
11
|
+
Defined in: [src/omit-empty-deep.ts:33](https://github.com/isdk/util.js/blob/40caefda2d376f288af37d8babc9da0357d94056/src/omit-empty-deep.ts#L33)
|
|
12
|
+
|
|
13
|
+
Deeply removes empty values from objects or arrays, supporting both string and Symbol keys.
|
|
14
|
+
|
|
15
|
+
## Type Parameters
|
|
16
|
+
|
|
17
|
+
### T
|
|
18
|
+
|
|
19
|
+
`T`
|
|
20
|
+
|
|
21
|
+
The type of the input value
|
|
22
|
+
|
|
23
|
+
## Parameters
|
|
24
|
+
|
|
25
|
+
### value
|
|
26
|
+
|
|
27
|
+
`T`
|
|
28
|
+
|
|
29
|
+
The original data that needs to be cleaned
|
|
30
|
+
|
|
31
|
+
## Returns
|
|
32
|
+
|
|
33
|
+
`any`
|
|
34
|
+
|
|
35
|
+
The cleaned data. If the input value itself is deeply empty, returns undefined.
|
|
36
|
+
|
|
37
|
+
## Remarks
|
|
38
|
+
|
|
39
|
+
This function uses recursion to clean data. For objects, it handles both `string` keys and `Symbol` keys.
|
|
40
|
+
If child objects or child arrays become empty after cleaning, their corresponding keys will also be removed from the parent object.
|
|
41
|
+
|
|
42
|
+
## Example
|
|
43
|
+
|
|
44
|
+
```ts
|
|
45
|
+
const sym = Symbol('id');
|
|
46
|
+
omitEmptyDeep({ [sym]: "", a: 1 }) // => { a: 1 }
|
|
47
|
+
```
|
|
@@ -8,7 +8,7 @@
|
|
|
8
8
|
|
|
9
9
|
> **parseFrontMatter**(`value`, `delimiter`): `object`
|
|
10
10
|
|
|
11
|
-
Defined in: [src/front-matter.ts:6](https://github.com/isdk/util.js/blob/
|
|
11
|
+
Defined in: [src/front-matter.ts:6](https://github.com/isdk/util.js/blob/40caefda2d376f288af37d8babc9da0357d94056/src/front-matter.ts#L6)
|
|
12
12
|
|
|
13
13
|
## Parameters
|
|
14
14
|
|
|
@@ -8,7 +8,7 @@
|
|
|
8
8
|
|
|
9
9
|
> **parseYaml**(`content`, `options?`): `any`
|
|
10
10
|
|
|
11
|
-
Defined in: [src/yaml.ts:51](https://github.com/isdk/util.js/blob/
|
|
11
|
+
Defined in: [src/yaml.ts:51](https://github.com/isdk/util.js/blob/40caefda2d376f288af37d8babc9da0357d94056/src/yaml.ts#L51)
|
|
12
12
|
|
|
13
13
|
Parses a YAML string into a JavaScript object with optional custom tags.
|
|
14
14
|
|
|
@@ -8,7 +8,7 @@
|
|
|
8
8
|
|
|
9
9
|
> **reControlCharsRegex**(): `RegExp`
|
|
10
10
|
|
|
11
|
-
Defined in: [src/filename.ts:50](https://github.com/isdk/util.js/blob/
|
|
11
|
+
Defined in: [src/filename.ts:50](https://github.com/isdk/util.js/blob/40caefda2d376f288af37d8babc9da0357d94056/src/filename.ts#L50)
|
|
12
12
|
|
|
13
13
|
Returns a new regular expression instance for control characters in a filename with the 'g' flag.
|
|
14
14
|
|
|
@@ -8,7 +8,7 @@
|
|
|
8
8
|
|
|
9
9
|
> **registerYamlTag**(`tags`): `void`
|
|
10
10
|
|
|
11
|
-
Defined in: [src/yaml.ts:23](https://github.com/isdk/util.js/blob/
|
|
11
|
+
Defined in: [src/yaml.ts:23](https://github.com/isdk/util.js/blob/40caefda2d376f288af37d8babc9da0357d94056/src/yaml.ts#L23)
|
|
12
12
|
|
|
13
13
|
Registers custom YAML tags to be used in parsing and stringifying YAML content.
|
|
14
14
|
|
|
@@ -8,7 +8,7 @@
|
|
|
8
8
|
|
|
9
9
|
> **removeLeadingEmptyLines**(`text`): `string`
|
|
10
10
|
|
|
11
|
-
Defined in: [src/remove-leading-empty-lines.ts:16](https://github.com/isdk/util.js/blob/
|
|
11
|
+
Defined in: [src/remove-leading-empty-lines.ts:16](https://github.com/isdk/util.js/blob/40caefda2d376f288af37d8babc9da0357d94056/src/remove-leading-empty-lines.ts#L16)
|
|
12
12
|
|
|
13
13
|
Removes all leading empty lines or "#" comments line from the given string.
|
|
14
14
|
|
|
@@ -8,7 +8,7 @@
|
|
|
8
8
|
|
|
9
9
|
> **sanitizeFilename**(`filename`, `options`): `string`
|
|
10
10
|
|
|
11
|
-
Defined in: [src/filename.ts:97](https://github.com/isdk/util.js/blob/
|
|
11
|
+
Defined in: [src/filename.ts:97](https://github.com/isdk/util.js/blob/40caefda2d376f288af37d8babc9da0357d94056/src/filename.ts#L97)
|
|
12
12
|
|
|
13
13
|
Sanitizes a given filename by replacing invalid characters with a specified replacement character or a default.
|
|
14
14
|
|
|
@@ -8,7 +8,7 @@
|
|
|
8
8
|
|
|
9
9
|
> **sanitizeFilepath**(`filepath`, `options`): `string`
|
|
10
10
|
|
|
11
|
-
Defined in: [src/filename.ts:149](https://github.com/isdk/util.js/blob/
|
|
11
|
+
Defined in: [src/filename.ts:149](https://github.com/isdk/util.js/blob/40caefda2d376f288af37d8babc9da0357d94056/src/filename.ts#L149)
|
|
12
12
|
|
|
13
13
|
Sanitizes each part of a file path and reassembles it, ensuring the path is valid according to provided options.
|
|
14
14
|
|
package/docs/functions/sleep.md
CHANGED
|
@@ -8,7 +8,7 @@
|
|
|
8
8
|
|
|
9
9
|
> **sleep**(`ms`): `Promise`\<`void`\>
|
|
10
10
|
|
|
11
|
-
Defined in: [src/sleep.ts:12](https://github.com/isdk/util.js/blob/
|
|
11
|
+
Defined in: [src/sleep.ts:12](https://github.com/isdk/util.js/blob/40caefda2d376f288af37d8babc9da0357d94056/src/sleep.ts#L12)
|
|
12
12
|
|
|
13
13
|
Suspends execution for a specified number of milliseconds
|
|
14
14
|
|
|
@@ -8,7 +8,7 @@
|
|
|
8
8
|
|
|
9
9
|
> **stringifyYaml**(`content`, `options?`): `string`
|
|
10
10
|
|
|
11
|
-
Defined in: [src/yaml.ts:85](https://github.com/isdk/util.js/blob/
|
|
11
|
+
Defined in: [src/yaml.ts:85](https://github.com/isdk/util.js/blob/40caefda2d376f288af37d8babc9da0357d94056/src/yaml.ts#L85)
|
|
12
12
|
|
|
13
13
|
Converts a JavaScript object into a YAML string with optional custom tags.
|
|
14
14
|
|
|
@@ -8,7 +8,7 @@
|
|
|
8
8
|
|
|
9
9
|
> **toCamelCase**(`str`): `string`
|
|
10
10
|
|
|
11
|
-
Defined in: [src/to-camel-case.ts:17](https://github.com/isdk/util.js/blob/
|
|
11
|
+
Defined in: [src/to-camel-case.ts:17](https://github.com/isdk/util.js/blob/40caefda2d376f288af37d8babc9da0357d94056/src/to-camel-case.ts#L17)
|
|
12
12
|
|
|
13
13
|
Converts a string to camelCase.
|
|
14
14
|
|
|
@@ -8,7 +8,7 @@
|
|
|
8
8
|
|
|
9
9
|
> **toCapitalCase**(`str`): `string`
|
|
10
10
|
|
|
11
|
-
Defined in: [src/to-capital-case.ts:17](https://github.com/isdk/util.js/blob/
|
|
11
|
+
Defined in: [src/to-capital-case.ts:17](https://github.com/isdk/util.js/blob/40caefda2d376f288af37d8babc9da0357d94056/src/to-capital-case.ts#L17)
|
|
12
12
|
|
|
13
13
|
Converts a string to capital case, where the first letter of each word is capitalized
|
|
14
14
|
and the rest are in lowercase. Words are separated by spaces, hyphens, or underscores.
|
|
@@ -8,7 +8,7 @@
|
|
|
8
8
|
|
|
9
9
|
> **toPascalCase**(`str`): `string`
|
|
10
10
|
|
|
11
|
-
Defined in: [src/to-pascal-case.ts:16](https://github.com/isdk/util.js/blob/
|
|
11
|
+
Defined in: [src/to-pascal-case.ts:16](https://github.com/isdk/util.js/blob/40caefda2d376f288af37d8babc9da0357d94056/src/to-pascal-case.ts#L16)
|
|
12
12
|
|
|
13
13
|
Converts a string to PascalCase.
|
|
14
14
|
|
|
@@ -8,7 +8,7 @@
|
|
|
8
8
|
|
|
9
9
|
> **traverseFolder**(`directoryPath`, `fileHandler`): `Promise`\<`void`\>
|
|
10
10
|
|
|
11
|
-
Defined in: [src/traverse-folder.ts:38](https://github.com/isdk/util.js/blob/
|
|
11
|
+
Defined in: [src/traverse-folder.ts:38](https://github.com/isdk/util.js/blob/40caefda2d376f288af37d8babc9da0357d94056/src/traverse-folder.ts#L38)
|
|
12
12
|
|
|
13
13
|
Traverses a folder asynchronously and applies a handler to each file or directory.
|
|
14
14
|
|
|
@@ -8,7 +8,7 @@
|
|
|
8
8
|
|
|
9
9
|
> **traverseFolderSync**(`directoryPath`, `fileHandler`): `void`
|
|
10
10
|
|
|
11
|
-
Defined in: [src/traverse-folder.ts:76](https://github.com/isdk/util.js/blob/
|
|
11
|
+
Defined in: [src/traverse-folder.ts:76](https://github.com/isdk/util.js/blob/40caefda2d376f288af37d8babc9da0357d94056/src/traverse-folder.ts#L76)
|
|
12
12
|
|
|
13
13
|
Traverses a folder synchronously and applies a handler to each file or directory.
|
|
14
14
|
|
|
@@ -8,7 +8,7 @@
|
|
|
8
8
|
|
|
9
9
|
> **yieldExec**(): `Promise`\<`void`\>
|
|
10
10
|
|
|
11
|
-
Defined in: [src/sleep.ts:28](https://github.com/isdk/util.js/blob/
|
|
11
|
+
Defined in: [src/sleep.ts:28](https://github.com/isdk/util.js/blob/40caefda2d376f288af37d8babc9da0357d94056/src/sleep.ts#L28)
|
|
12
12
|
|
|
13
13
|
Yields execution control to the event loop, allowing pending I/O operations
|
|
14
14
|
and scheduled tasks to run before continuing.
|
package/docs/globals.md
CHANGED
|
@@ -51,6 +51,8 @@
|
|
|
51
51
|
- [isValidFilename](functions/isValidFilename.md)
|
|
52
52
|
- [isValidFilepath](functions/isValidFilepath.md)
|
|
53
53
|
- [normalizeIncludeFiles](functions/normalizeIncludeFiles.md)
|
|
54
|
+
- [omitDeepBy](functions/omitDeepBy.md)
|
|
55
|
+
- [omitEmptyDeep](functions/omitEmptyDeep.md)
|
|
54
56
|
- [parseFrontMatter](functions/parseFrontMatter.md)
|
|
55
57
|
- [parseYaml](functions/parseYaml.md)
|
|
56
58
|
- [RateLimit](functions/RateLimit.md)
|
|
@@ -6,7 +6,7 @@
|
|
|
6
6
|
|
|
7
7
|
# Interface: BinarySemaphoreAcquireOptions
|
|
8
8
|
|
|
9
|
-
Defined in: [src/async-semaphore.ts:28](https://github.com/isdk/util.js/blob/
|
|
9
|
+
Defined in: [src/async-semaphore.ts:28](https://github.com/isdk/util.js/blob/40caefda2d376f288af37d8babc9da0357d94056/src/async-semaphore.ts#L28)
|
|
10
10
|
|
|
11
11
|
## Extended by
|
|
12
12
|
|
|
@@ -22,4 +22,4 @@ Defined in: [src/async-semaphore.ts:28](https://github.com/isdk/util.js/blob/124
|
|
|
22
22
|
|
|
23
23
|
> `optional` **signal**: `AbortSignal`
|
|
24
24
|
|
|
25
|
-
Defined in: [src/async-semaphore.ts:29](https://github.com/isdk/util.js/blob/
|
|
25
|
+
Defined in: [src/async-semaphore.ts:29](https://github.com/isdk/util.js/blob/40caefda2d376f288af37d8babc9da0357d94056/src/async-semaphore.ts#L29)
|
|
@@ -6,7 +6,7 @@
|
|
|
6
6
|
|
|
7
7
|
# Interface: BinarySemaphoreOptions
|
|
8
8
|
|
|
9
|
-
Defined in: [src/async-semaphore.ts:21](https://github.com/isdk/util.js/blob/
|
|
9
|
+
Defined in: [src/async-semaphore.ts:21](https://github.com/isdk/util.js/blob/40caefda2d376f288af37d8babc9da0357d94056/src/async-semaphore.ts#L21)
|
|
10
10
|
|
|
11
11
|
## Extended by
|
|
12
12
|
|
|
@@ -18,7 +18,7 @@ Defined in: [src/async-semaphore.ts:21](https://github.com/isdk/util.js/blob/124
|
|
|
18
18
|
|
|
19
19
|
> `optional` **capacity**: `number`
|
|
20
20
|
|
|
21
|
-
Defined in: [src/async-semaphore.ts:25](https://github.com/isdk/util.js/blob/
|
|
21
|
+
Defined in: [src/async-semaphore.ts:25](https://github.com/isdk/util.js/blob/40caefda2d376f288af37d8babc9da0357d94056/src/async-semaphore.ts#L25)
|
|
22
22
|
|
|
23
23
|
***
|
|
24
24
|
|
|
@@ -26,7 +26,7 @@ Defined in: [src/async-semaphore.ts:25](https://github.com/isdk/util.js/blob/124
|
|
|
26
26
|
|
|
27
27
|
> `optional` **initFn**: () => `any`
|
|
28
28
|
|
|
29
|
-
Defined in: [src/async-semaphore.ts:22](https://github.com/isdk/util.js/blob/
|
|
29
|
+
Defined in: [src/async-semaphore.ts:22](https://github.com/isdk/util.js/blob/40caefda2d376f288af37d8babc9da0357d94056/src/async-semaphore.ts#L22)
|
|
30
30
|
|
|
31
31
|
#### Returns
|
|
32
32
|
|
|
@@ -38,7 +38,7 @@ Defined in: [src/async-semaphore.ts:22](https://github.com/isdk/util.js/blob/124
|
|
|
38
38
|
|
|
39
39
|
> `optional` **pauseFn**: () => `void`
|
|
40
40
|
|
|
41
|
-
Defined in: [src/async-semaphore.ts:23](https://github.com/isdk/util.js/blob/
|
|
41
|
+
Defined in: [src/async-semaphore.ts:23](https://github.com/isdk/util.js/blob/40caefda2d376f288af37d8babc9da0357d94056/src/async-semaphore.ts#L23)
|
|
42
42
|
|
|
43
43
|
#### Returns
|
|
44
44
|
|
|
@@ -50,7 +50,7 @@ Defined in: [src/async-semaphore.ts:23](https://github.com/isdk/util.js/blob/124
|
|
|
50
50
|
|
|
51
51
|
> `optional` **resumeFn**: () => `void`
|
|
52
52
|
|
|
53
|
-
Defined in: [src/async-semaphore.ts:24](https://github.com/isdk/util.js/blob/
|
|
53
|
+
Defined in: [src/async-semaphore.ts:24](https://github.com/isdk/util.js/blob/40caefda2d376f288af37d8babc9da0357d94056/src/async-semaphore.ts#L24)
|
|
54
54
|
|
|
55
55
|
#### Returns
|
|
56
56
|
|
|
@@ -6,7 +6,7 @@
|
|
|
6
6
|
|
|
7
7
|
# Interface: BinarySemaphoreReleaseOptions
|
|
8
8
|
|
|
9
|
-
Defined in: [src/async-semaphore.ts:33](https://github.com/isdk/util.js/blob/
|
|
9
|
+
Defined in: [src/async-semaphore.ts:33](https://github.com/isdk/util.js/blob/40caefda2d376f288af37d8babc9da0357d94056/src/async-semaphore.ts#L33)
|
|
10
10
|
|
|
11
11
|
## Extended by
|
|
12
12
|
|
|
@@ -22,4 +22,4 @@ Defined in: [src/async-semaphore.ts:33](https://github.com/isdk/util.js/blob/124
|
|
|
22
22
|
|
|
23
23
|
> `optional` **token**: `any`
|
|
24
24
|
|
|
25
|
-
Defined in: [src/async-semaphore.ts:34](https://github.com/isdk/util.js/blob/
|
|
25
|
+
Defined in: [src/async-semaphore.ts:34](https://github.com/isdk/util.js/blob/40caefda2d376f288af37d8babc9da0357d94056/src/async-semaphore.ts#L34)
|
|
@@ -6,7 +6,7 @@
|
|
|
6
6
|
|
|
7
7
|
# Interface: BinarySemaphoreReleaserFunc()
|
|
8
8
|
|
|
9
|
-
Defined in: [src/async-semaphore.ts:38](https://github.com/isdk/util.js/blob/
|
|
9
|
+
Defined in: [src/async-semaphore.ts:38](https://github.com/isdk/util.js/blob/40caefda2d376f288af37d8babc9da0357d94056/src/async-semaphore.ts#L38)
|
|
10
10
|
|
|
11
11
|
## Extends
|
|
12
12
|
|
|
@@ -14,7 +14,7 @@ Defined in: [src/async-semaphore.ts:38](https://github.com/isdk/util.js/blob/124
|
|
|
14
14
|
|
|
15
15
|
> **BinarySemaphoreReleaserFunc**(): `void`
|
|
16
16
|
|
|
17
|
-
Defined in: [src/async-semaphore.ts:39](https://github.com/isdk/util.js/blob/
|
|
17
|
+
Defined in: [src/async-semaphore.ts:39](https://github.com/isdk/util.js/blob/40caefda2d376f288af37d8babc9da0357d94056/src/async-semaphore.ts#L39)
|
|
18
18
|
|
|
19
19
|
## Returns
|
|
20
20
|
|
|
@@ -30,7 +30,7 @@ Defined in: [src/async-semaphore.ts:39](https://github.com/isdk/util.js/blob/124
|
|
|
30
30
|
|
|
31
31
|
> `optional` **token**: `any`
|
|
32
32
|
|
|
33
|
-
Defined in: [src/async-semaphore.ts:34](https://github.com/isdk/util.js/blob/
|
|
33
|
+
Defined in: [src/async-semaphore.ts:34](https://github.com/isdk/util.js/blob/40caefda2d376f288af37d8babc9da0357d94056/src/async-semaphore.ts#L34)
|
|
34
34
|
|
|
35
35
|
#### Inherited from
|
|
36
36
|
|
|
@@ -6,7 +6,7 @@
|
|
|
6
6
|
|
|
7
7
|
# Interface: IncludeFiles
|
|
8
8
|
|
|
9
|
-
Defined in: [src/include-files.ts:6](https://github.com/isdk/util.js/blob/
|
|
9
|
+
Defined in: [src/include-files.ts:6](https://github.com/isdk/util.js/blob/40caefda2d376f288af37d8babc9da0357d94056/src/include-files.ts#L6)
|
|
10
10
|
|
|
11
11
|
## Properties
|
|
12
12
|
|
|
@@ -14,7 +14,7 @@ Defined in: [src/include-files.ts:6](https://github.com/isdk/util.js/blob/1244ec
|
|
|
14
14
|
|
|
15
15
|
> `optional` **exclude**: `string`[]
|
|
16
16
|
|
|
17
|
-
Defined in: [src/include-files.ts:8](https://github.com/isdk/util.js/blob/
|
|
17
|
+
Defined in: [src/include-files.ts:8](https://github.com/isdk/util.js/blob/40caefda2d376f288af37d8babc9da0357d94056/src/include-files.ts#L8)
|
|
18
18
|
|
|
19
19
|
***
|
|
20
20
|
|
|
@@ -22,4 +22,4 @@ Defined in: [src/include-files.ts:8](https://github.com/isdk/util.js/blob/1244ec
|
|
|
22
22
|
|
|
23
23
|
> `optional` **include**: `string`[]
|
|
24
24
|
|
|
25
|
-
Defined in: [src/include-files.ts:7](https://github.com/isdk/util.js/blob/
|
|
25
|
+
Defined in: [src/include-files.ts:7](https://github.com/isdk/util.js/blob/40caefda2d376f288af37d8babc9da0357d94056/src/include-files.ts#L7)
|
|
@@ -6,7 +6,7 @@
|
|
|
6
6
|
|
|
7
7
|
# Interface: LoadConfigFileOptions
|
|
8
8
|
|
|
9
|
-
Defined in: [src/config-file.ts:20](https://github.com/isdk/util.js/blob/
|
|
9
|
+
Defined in: [src/config-file.ts:20](https://github.com/isdk/util.js/blob/40caefda2d376f288af37d8babc9da0357d94056/src/config-file.ts#L20)
|
|
10
10
|
|
|
11
11
|
## Properties
|
|
12
12
|
|
|
@@ -14,7 +14,7 @@ Defined in: [src/config-file.ts:20](https://github.com/isdk/util.js/blob/1244ecc
|
|
|
14
14
|
|
|
15
15
|
> `optional` **externalFile**: `string`
|
|
16
16
|
|
|
17
|
-
Defined in: [src/config-file.ts:22](https://github.com/isdk/util.js/blob/
|
|
17
|
+
Defined in: [src/config-file.ts:22](https://github.com/isdk/util.js/blob/40caefda2d376f288af37d8babc9da0357d94056/src/config-file.ts#L22)
|
|
18
18
|
|
|
19
19
|
***
|
|
20
20
|
|
|
@@ -22,4 +22,4 @@ Defined in: [src/config-file.ts:22](https://github.com/isdk/util.js/blob/1244ecc
|
|
|
22
22
|
|
|
23
23
|
> `optional` **extLevel**: `number`
|
|
24
24
|
|
|
25
|
-
Defined in: [src/config-file.ts:21](https://github.com/isdk/util.js/blob/
|
|
25
|
+
Defined in: [src/config-file.ts:21](https://github.com/isdk/util.js/blob/40caefda2d376f288af37d8babc9da0357d94056/src/config-file.ts#L21)
|
|
@@ -6,7 +6,7 @@
|
|
|
6
6
|
|
|
7
7
|
# Interface: SanitizeFilenameOptions
|
|
8
8
|
|
|
9
|
-
Defined in: [src/filename.ts:83](https://github.com/isdk/util.js/blob/
|
|
9
|
+
Defined in: [src/filename.ts:83](https://github.com/isdk/util.js/blob/40caefda2d376f288af37d8babc9da0357d94056/src/filename.ts#L83)
|
|
10
10
|
|
|
11
11
|
## Properties
|
|
12
12
|
|
|
@@ -14,7 +14,7 @@ Defined in: [src/filename.ts:83](https://github.com/isdk/util.js/blob/1244ecc63e
|
|
|
14
14
|
|
|
15
15
|
> `optional` **maxLength**: `number`
|
|
16
16
|
|
|
17
|
-
Defined in: [src/filename.ts:85](https://github.com/isdk/util.js/blob/
|
|
17
|
+
Defined in: [src/filename.ts:85](https://github.com/isdk/util.js/blob/40caefda2d376f288af37d8babc9da0357d94056/src/filename.ts#L85)
|
|
18
18
|
|
|
19
19
|
***
|
|
20
20
|
|
|
@@ -22,4 +22,4 @@ Defined in: [src/filename.ts:85](https://github.com/isdk/util.js/blob/1244ecc63e
|
|
|
22
22
|
|
|
23
23
|
> `optional` **replacement**: `string`
|
|
24
24
|
|
|
25
|
-
Defined in: [src/filename.ts:84](https://github.com/isdk/util.js/blob/
|
|
25
|
+
Defined in: [src/filename.ts:84](https://github.com/isdk/util.js/blob/40caefda2d376f288af37d8babc9da0357d94056/src/filename.ts#L84)
|
|
@@ -6,7 +6,7 @@
|
|
|
6
6
|
|
|
7
7
|
# Interface: SemaphoreOptions
|
|
8
8
|
|
|
9
|
-
Defined in: [src/async-semaphore.ts:42](https://github.com/isdk/util.js/blob/
|
|
9
|
+
Defined in: [src/async-semaphore.ts:42](https://github.com/isdk/util.js/blob/40caefda2d376f288af37d8babc9da0357d94056/src/async-semaphore.ts#L42)
|
|
10
10
|
|
|
11
11
|
## Extends
|
|
12
12
|
|
|
@@ -18,7 +18,7 @@ Defined in: [src/async-semaphore.ts:42](https://github.com/isdk/util.js/blob/124
|
|
|
18
18
|
|
|
19
19
|
> `optional` **capacity**: `number`
|
|
20
20
|
|
|
21
|
-
Defined in: [src/async-semaphore.ts:25](https://github.com/isdk/util.js/blob/
|
|
21
|
+
Defined in: [src/async-semaphore.ts:25](https://github.com/isdk/util.js/blob/40caefda2d376f288af37d8babc9da0357d94056/src/async-semaphore.ts#L25)
|
|
22
22
|
|
|
23
23
|
#### Inherited from
|
|
24
24
|
|
|
@@ -30,7 +30,7 @@ Defined in: [src/async-semaphore.ts:25](https://github.com/isdk/util.js/blob/124
|
|
|
30
30
|
|
|
31
31
|
> `optional` **initFn**: () => `any`
|
|
32
32
|
|
|
33
|
-
Defined in: [src/async-semaphore.ts:22](https://github.com/isdk/util.js/blob/
|
|
33
|
+
Defined in: [src/async-semaphore.ts:22](https://github.com/isdk/util.js/blob/40caefda2d376f288af37d8babc9da0357d94056/src/async-semaphore.ts#L22)
|
|
34
34
|
|
|
35
35
|
#### Returns
|
|
36
36
|
|
|
@@ -46,7 +46,7 @@ Defined in: [src/async-semaphore.ts:22](https://github.com/isdk/util.js/blob/124
|
|
|
46
46
|
|
|
47
47
|
> `optional` **isReadyFn**: [`SemaphoreIsReadyFuncType`](../type-aliases/SemaphoreIsReadyFuncType.md)
|
|
48
48
|
|
|
49
|
-
Defined in: [src/async-semaphore.ts:44](https://github.com/isdk/util.js/blob/
|
|
49
|
+
Defined in: [src/async-semaphore.ts:44](https://github.com/isdk/util.js/blob/40caefda2d376f288af37d8babc9da0357d94056/src/async-semaphore.ts#L44)
|
|
50
50
|
|
|
51
51
|
***
|
|
52
52
|
|
|
@@ -54,7 +54,7 @@ Defined in: [src/async-semaphore.ts:44](https://github.com/isdk/util.js/blob/124
|
|
|
54
54
|
|
|
55
55
|
> `optional` **maxConcurrency**: `number`
|
|
56
56
|
|
|
57
|
-
Defined in: [src/async-semaphore.ts:43](https://github.com/isdk/util.js/blob/
|
|
57
|
+
Defined in: [src/async-semaphore.ts:43](https://github.com/isdk/util.js/blob/40caefda2d376f288af37d8babc9da0357d94056/src/async-semaphore.ts#L43)
|
|
58
58
|
|
|
59
59
|
***
|
|
60
60
|
|
|
@@ -62,7 +62,7 @@ Defined in: [src/async-semaphore.ts:43](https://github.com/isdk/util.js/blob/124
|
|
|
62
62
|
|
|
63
63
|
> `optional` **pauseFn**: () => `void`
|
|
64
64
|
|
|
65
|
-
Defined in: [src/async-semaphore.ts:23](https://github.com/isdk/util.js/blob/
|
|
65
|
+
Defined in: [src/async-semaphore.ts:23](https://github.com/isdk/util.js/blob/40caefda2d376f288af37d8babc9da0357d94056/src/async-semaphore.ts#L23)
|
|
66
66
|
|
|
67
67
|
#### Returns
|
|
68
68
|
|
|
@@ -78,7 +78,7 @@ Defined in: [src/async-semaphore.ts:23](https://github.com/isdk/util.js/blob/124
|
|
|
78
78
|
|
|
79
79
|
> `optional` **resumeFn**: () => `void`
|
|
80
80
|
|
|
81
|
-
Defined in: [src/async-semaphore.ts:24](https://github.com/isdk/util.js/blob/
|
|
81
|
+
Defined in: [src/async-semaphore.ts:24](https://github.com/isdk/util.js/blob/40caefda2d376f288af37d8babc9da0357d94056/src/async-semaphore.ts#L24)
|
|
82
82
|
|
|
83
83
|
#### Returns
|
|
84
84
|
|