@augment-vir/common 30.0.0 → 30.0.1
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/README.md +11 -0
- package/dist/augments/array/array-map.d.ts +29 -1
- package/dist/augments/array/array-map.js +29 -1
- package/dist/augments/array/array-to-object.d.ts +41 -5
- package/dist/augments/array/array-to-object.js +41 -5
- package/dist/augments/array/awaited/awaited-filter.d.ts +29 -0
- package/dist/augments/array/awaited/awaited-filter.js +29 -0
- package/dist/augments/array/awaited/awaited-for-each.d.ts +28 -3
- package/dist/augments/array/awaited/awaited-for-each.js +28 -3
- package/dist/augments/array/awaited/awaited-map.d.ts +32 -0
- package/dist/augments/array/awaited/awaited-map.js +32 -0
- package/dist/augments/array/filter.d.ts +29 -0
- package/dist/augments/array/filter.js +61 -0
- package/dist/augments/array/remove-duplicates.d.ts +60 -1
- package/dist/augments/array/remove-duplicates.js +61 -2
- package/dist/augments/array/repeat-array.d.ts +22 -0
- package/dist/augments/array/repeat-array.js +22 -0
- package/dist/augments/array/shuffle-array.d.ts +8 -1
- package/dist/augments/array/shuffle-array.js +8 -1
- package/dist/augments/array/string-array.d.ts +8 -0
- package/dist/augments/array/string-array.js +8 -0
- package/dist/augments/enum/enum-value-check.d.ts +30 -0
- package/dist/augments/enum/enum-value-check.js +30 -0
- package/dist/augments/error/combine-errors.d.ts +24 -3
- package/dist/augments/error/combine-errors.js +26 -4
- package/dist/augments/function/call-asynchronously.d.ts +19 -0
- package/dist/augments/function/call-asynchronously.js +19 -0
- package/dist/augments/function/call-with-retries.d.ts +23 -3
- package/dist/augments/function/call-with-retries.js +23 -0
- package/dist/augments/function/debounce.d.ts +71 -4
- package/dist/augments/function/debounce.js +66 -4
- package/dist/augments/function/execution-duration.d.ts +17 -5
- package/dist/augments/function/execution-duration.js +16 -3
- package/dist/augments/function/if-truthy.d.ts +28 -0
- package/dist/augments/function/if-truthy.js +35 -0
- package/dist/augments/function/wrap-in-try.d.ts +12 -4
- package/dist/augments/function/wrap-in-try.js +64 -0
- package/dist/augments/json/append-json.d.ts +3 -3
- package/dist/augments/json/append-json.js +33 -0
- package/dist/augments/json/copy-through-json.d.ts +32 -1
- package/dist/augments/json/copy-through-json.js +32 -1
- package/dist/augments/json/json-compatible.d.ts +37 -9
- package/dist/augments/json/jsonify.d.ts +30 -1
- package/dist/augments/json/jsonify.js +31 -2
- package/dist/augments/log/log-colors.d.ts +41 -0
- package/dist/augments/log/log-colors.js +43 -2
- package/dist/augments/log/log-string.d.ts +21 -0
- package/dist/augments/log/log-string.js +9 -2
- package/dist/augments/log/log-writer.d.ts +22 -0
- package/dist/augments/log/log.d.ts +44 -1
- package/dist/augments/log/log.js +46 -3
- package/dist/augments/log/logger.d.ts +49 -0
- package/dist/augments/log/logger.js +21 -0
- package/dist/augments/number/clamp.d.ts +13 -2
- package/dist/augments/number/clamp.js +12 -1
- package/dist/augments/number/coords.d.ts +6 -2
- package/dist/augments/number/digit.d.ts +7 -0
- package/dist/augments/number/dimensions.d.ts +6 -2
- package/dist/augments/number/min-max.d.ts +9 -2
- package/dist/augments/number/min-max.js +4 -2
- package/dist/augments/number/number-conversion.d.ts +9 -3
- package/dist/augments/number/number-conversion.js +10 -4
- package/dist/augments/number/round.d.ts +19 -0
- package/dist/augments/number/round.js +19 -0
- package/dist/augments/number/scientific.d.ts +18 -1
- package/dist/augments/number/scientific.js +18 -1
- package/dist/augments/number/truncate-number.d.ts +24 -3
- package/dist/augments/number/truncate-number.js +28 -8
- package/dist/augments/number/wrap-number.d.ts +9 -3
- package/dist/augments/number/wrap-number.js +8 -2
- package/dist/augments/object/diff.d.ts +27 -5
- package/dist/augments/object/diff.js +20 -4
- package/dist/augments/object/empty.d.ts +7 -1
- package/dist/augments/object/get-or-set.d.ts +6 -27
- package/dist/augments/object/get-or-set.js +66 -4
- package/dist/augments/object/key-count.d.ts +4 -0
- package/dist/augments/object/map-entries.js +23 -0
- package/dist/augments/object/map-enum.d.ts +7 -0
- package/dist/augments/object/map-enum.js +24 -0
- package/dist/augments/object/map-values.d.ts +25 -13
- package/dist/augments/object/map-values.js +29 -21
- package/dist/augments/object/merge-deep.d.ts +4 -0
- package/dist/augments/object/merge-deep.js +4 -0
- package/dist/augments/object/merge-defined-properties.d.ts +13 -0
- package/dist/augments/object/merge-defined-properties.js +13 -0
- package/dist/augments/object/merge-property-arrays.d.ts +28 -0
- package/dist/augments/object/merge-property-arrays.js +28 -0
- package/dist/augments/object/object-entries.d.ts +27 -0
- package/dist/augments/object/object-entries.js +27 -0
- package/dist/augments/object/object-filter.d.ts +20 -0
- package/dist/augments/object/object-filter.js +20 -0
- package/dist/augments/object/object-keys.d.ts +32 -0
- package/dist/augments/object/object-keys.js +32 -0
- package/dist/augments/object/object-values.d.ts +9 -0
- package/dist/augments/object/object-values.js +9 -0
- package/dist/augments/path/esm-path.d.ts +26 -0
- package/dist/augments/path/esm-path.js +31 -0
- package/dist/augments/prisma/prisma-models.d.ts +40 -3
- package/dist/augments/promise/timed-promise.d.ts +15 -0
- package/dist/augments/promise/timed-promise.js +15 -0
- package/dist/augments/random/random-boolean.d.ts +6 -0
- package/dist/augments/random/random-boolean.js +6 -0
- package/dist/augments/random/random-integer.d.ts +3 -1
- package/dist/augments/random/random-integer.js +3 -1
- package/dist/augments/random/random-string.d.ts +6 -2
- package/dist/augments/random/random-string.js +6 -2
- package/dist/augments/regexp/match.d.ts +10 -0
- package/dist/augments/regexp/match.js +13 -0
- package/dist/augments/regexp/regexp-flags.d.ts +56 -3
- package/dist/augments/regexp/regexp-flags.js +71 -14
- package/dist/augments/regexp/regexp-string.d.ts +4 -0
- package/dist/augments/regexp/regexp-string.js +5 -1
- package/dist/augments/selection-set/select-collapsed.d.ts +46 -3
- package/dist/augments/selection-set/select-collapsed.js +40 -2
- package/dist/augments/selection-set/select-from.d.ts +47 -2
- package/dist/augments/selection-set/select-from.js +48 -1
- package/dist/augments/selection-set/selection-set.d.ts +26 -7
- package/dist/augments/selection-set/selection-set.js +1 -4
- package/dist/augments/string/casing/capitalization.d.ts +15 -1
- package/dist/augments/string/casing/capitalization.js +14 -0
- package/dist/augments/string/casing/casing.d.ts +53 -7
- package/dist/augments/string/casing/casing.js +36 -11
- package/dist/augments/string/casing/kebab-and-camel.d.ts +14 -0
- package/dist/augments/string/casing/kebab-and-camel.js +20 -5
- package/dist/augments/string/comma.d.ts +26 -0
- package/dist/augments/string/{commas.js → comma.js} +21 -2
- package/dist/augments/string/join.d.ts +15 -4
- package/dist/augments/string/join.js +15 -4
- package/dist/augments/string/prefix.d.ts +6 -0
- package/dist/augments/string/prefix.js +4 -0
- package/dist/augments/string/remove-duplicate-characters.d.ts +17 -0
- package/dist/augments/string/remove-duplicate-characters.js +22 -0
- package/dist/augments/string/replace.d.ts +17 -0
- package/dist/augments/string/replace.js +17 -0
- package/dist/augments/string/split.d.ts +29 -2
- package/dist/augments/string/split.js +32 -7
- package/dist/augments/string/substring-index.d.ts +11 -5
- package/dist/augments/string/substring-index.js +12 -3
- package/dist/augments/string/suffix.d.ts +22 -0
- package/dist/augments/string/suffix.js +16 -0
- package/dist/augments/string/white-space.d.ts +8 -1
- package/dist/augments/string/white-space.js +8 -1
- package/dist/augments/string/wrap-string.d.ts +15 -0
- package/dist/augments/string/wrap-string.js +15 -0
- package/dist/augments/type/ensure-type.d.ts +4 -0
- package/dist/augments/type/ensure-type.js +4 -0
- package/dist/augments/type/readonly.d.ts +7 -0
- package/dist/augments/type/readonly.js +7 -0
- package/dist/augments/type/type-recursion.d.ts +93 -1
- package/dist/augments/type/union.d.ts +1 -0
- package/dist/augments/type/union.js +1 -0
- package/dist/augments/type/void-type.d.ts +6 -2
- package/dist/augments/type/writable.d.ts +7 -0
- package/dist/augments/type/writable.js +7 -0
- package/dist/index.d.ts +6 -4
- package/dist/index.js +6 -4
- package/package.json +15 -5
- package/dist/augments/boolean/if-truthy.d.ts +0 -2
- package/dist/augments/boolean/if-truthy.js +0 -9
- package/dist/augments/file/esm-path.d.ts +0 -4
- package/dist/augments/file/esm-path.js +0 -8
- package/dist/augments/regexp/safe-match.d.ts +0 -1
- package/dist/augments/regexp/safe-match.js +0 -4
- package/dist/augments/string/commas.d.ts +0 -7
|
@@ -1,3 +1,10 @@
|
|
|
1
1
|
import type { Writable } from 'type-fest';
|
|
2
2
|
export type { Writable, WritableDeep } from 'type-fest';
|
|
3
|
+
/**
|
|
4
|
+
* This function does nothing but return the input as a writable typed version of itself.
|
|
5
|
+
*
|
|
6
|
+
* @category Type
|
|
7
|
+
* @category Package : @augment-vir/common
|
|
8
|
+
* @package [`@augment-vir/common`](https://www.npmjs.com/package/@augment-vir/common)
|
|
9
|
+
*/
|
|
3
10
|
export declare function makeWritable<T>(input: T): Writable<T>;
|
|
@@ -1,3 +1,10 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* This function does nothing but return the input as a writable typed version of itself.
|
|
3
|
+
*
|
|
4
|
+
* @category Type
|
|
5
|
+
* @category Package : @augment-vir/common
|
|
6
|
+
* @package [`@augment-vir/common`](https://www.npmjs.com/package/@augment-vir/common)
|
|
7
|
+
*/
|
|
1
8
|
export function makeWritable(input) {
|
|
2
9
|
return input;
|
|
3
10
|
}
|
package/dist/index.d.ts
CHANGED
|
@@ -8,15 +8,14 @@ export * from './augments/array/remove-duplicates.js';
|
|
|
8
8
|
export * from './augments/array/repeat-array.js';
|
|
9
9
|
export * from './augments/array/shuffle-array.js';
|
|
10
10
|
export * from './augments/array/string-array.js';
|
|
11
|
-
export * from './augments/boolean/if-truthy.js';
|
|
12
11
|
export * from './augments/core-exports.js';
|
|
13
12
|
export * from './augments/enum/enum-value-check.js';
|
|
14
13
|
export * from './augments/error/combine-errors.js';
|
|
15
|
-
export * from './augments/file/esm-path.js';
|
|
16
14
|
export * from './augments/function/call-asynchronously.js';
|
|
17
15
|
export * from './augments/function/call-with-retries.js';
|
|
18
16
|
export * from './augments/function/debounce.js';
|
|
19
17
|
export * from './augments/function/execution-duration.js';
|
|
18
|
+
export * from './augments/function/if-truthy.js';
|
|
20
19
|
export * from './augments/function/wrap-in-try.js';
|
|
21
20
|
export * from './augments/json/append-json.js';
|
|
22
21
|
export * from './augments/json/copy-through-json.js';
|
|
@@ -51,23 +50,25 @@ export * from './augments/object/object-entries.js';
|
|
|
51
50
|
export * from './augments/object/object-filter.js';
|
|
52
51
|
export * from './augments/object/object-keys.js';
|
|
53
52
|
export * from './augments/object/object-values.js';
|
|
53
|
+
export * from './augments/path/esm-path.js';
|
|
54
54
|
export * from './augments/prisma/prisma-models.js';
|
|
55
55
|
export * from './augments/promise/timed-promise.js';
|
|
56
56
|
export * from './augments/random/random-boolean.js';
|
|
57
57
|
export * from './augments/random/random-integer.js';
|
|
58
58
|
export * from './augments/random/random-string.js';
|
|
59
|
+
export * from './augments/regexp/match.js';
|
|
59
60
|
export * from './augments/regexp/regexp-flags.js';
|
|
60
61
|
export * from './augments/regexp/regexp-string.js';
|
|
61
|
-
export * from './augments/regexp/safe-match.js';
|
|
62
62
|
export * from './augments/selection-set/select-collapsed.js';
|
|
63
63
|
export * from './augments/selection-set/select-from.js';
|
|
64
64
|
export * from './augments/selection-set/selection-set.js';
|
|
65
65
|
export * from './augments/string/casing/capitalization.js';
|
|
66
66
|
export * from './augments/string/casing/casing.js';
|
|
67
67
|
export * from './augments/string/casing/kebab-and-camel.js';
|
|
68
|
-
export * from './augments/string/
|
|
68
|
+
export * from './augments/string/comma.js';
|
|
69
69
|
export * from './augments/string/join.js';
|
|
70
70
|
export * from './augments/string/prefix.js';
|
|
71
|
+
export * from './augments/string/remove-duplicate-characters.js';
|
|
71
72
|
export * from './augments/string/replace.js';
|
|
72
73
|
export * from './augments/string/split.js';
|
|
73
74
|
export * from './augments/string/substring-index.js';
|
|
@@ -77,5 +78,6 @@ export * from './augments/string/wrap-string.js';
|
|
|
77
78
|
export * from './augments/type/ensure-type.js';
|
|
78
79
|
export * from './augments/type/readonly.js';
|
|
79
80
|
export * from './augments/type/type-recursion.js';
|
|
81
|
+
export * from './augments/type/union.js';
|
|
80
82
|
export * from './augments/type/void-type.js';
|
|
81
83
|
export * from './augments/type/writable.js';
|
package/dist/index.js
CHANGED
|
@@ -8,15 +8,14 @@ export * from './augments/array/remove-duplicates.js';
|
|
|
8
8
|
export * from './augments/array/repeat-array.js';
|
|
9
9
|
export * from './augments/array/shuffle-array.js';
|
|
10
10
|
export * from './augments/array/string-array.js';
|
|
11
|
-
export * from './augments/boolean/if-truthy.js';
|
|
12
11
|
export * from './augments/core-exports.js';
|
|
13
12
|
export * from './augments/enum/enum-value-check.js';
|
|
14
13
|
export * from './augments/error/combine-errors.js';
|
|
15
|
-
export * from './augments/file/esm-path.js';
|
|
16
14
|
export * from './augments/function/call-asynchronously.js';
|
|
17
15
|
export * from './augments/function/call-with-retries.js';
|
|
18
16
|
export * from './augments/function/debounce.js';
|
|
19
17
|
export * from './augments/function/execution-duration.js';
|
|
18
|
+
export * from './augments/function/if-truthy.js';
|
|
20
19
|
export * from './augments/function/wrap-in-try.js';
|
|
21
20
|
export * from './augments/json/append-json.js';
|
|
22
21
|
export * from './augments/json/copy-through-json.js';
|
|
@@ -51,23 +50,25 @@ export * from './augments/object/object-entries.js';
|
|
|
51
50
|
export * from './augments/object/object-filter.js';
|
|
52
51
|
export * from './augments/object/object-keys.js';
|
|
53
52
|
export * from './augments/object/object-values.js';
|
|
53
|
+
export * from './augments/path/esm-path.js';
|
|
54
54
|
export * from './augments/prisma/prisma-models.js';
|
|
55
55
|
export * from './augments/promise/timed-promise.js';
|
|
56
56
|
export * from './augments/random/random-boolean.js';
|
|
57
57
|
export * from './augments/random/random-integer.js';
|
|
58
58
|
export * from './augments/random/random-string.js';
|
|
59
|
+
export * from './augments/regexp/match.js';
|
|
59
60
|
export * from './augments/regexp/regexp-flags.js';
|
|
60
61
|
export * from './augments/regexp/regexp-string.js';
|
|
61
|
-
export * from './augments/regexp/safe-match.js';
|
|
62
62
|
export * from './augments/selection-set/select-collapsed.js';
|
|
63
63
|
export * from './augments/selection-set/select-from.js';
|
|
64
64
|
export * from './augments/selection-set/selection-set.js';
|
|
65
65
|
export * from './augments/string/casing/capitalization.js';
|
|
66
66
|
export * from './augments/string/casing/casing.js';
|
|
67
67
|
export * from './augments/string/casing/kebab-and-camel.js';
|
|
68
|
-
export * from './augments/string/
|
|
68
|
+
export * from './augments/string/comma.js';
|
|
69
69
|
export * from './augments/string/join.js';
|
|
70
70
|
export * from './augments/string/prefix.js';
|
|
71
|
+
export * from './augments/string/remove-duplicate-characters.js';
|
|
71
72
|
export * from './augments/string/replace.js';
|
|
72
73
|
export * from './augments/string/split.js';
|
|
73
74
|
export * from './augments/string/substring-index.js';
|
|
@@ -77,5 +78,6 @@ export * from './augments/string/wrap-string.js';
|
|
|
77
78
|
export * from './augments/type/ensure-type.js';
|
|
78
79
|
export * from './augments/type/readonly.js';
|
|
79
80
|
export * from './augments/type/type-recursion.js';
|
|
81
|
+
export * from './augments/type/union.js';
|
|
80
82
|
export * from './augments/type/void-type.js';
|
|
81
83
|
export * from './augments/type/writable.js';
|
package/package.json
CHANGED
|
@@ -1,6 +1,18 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@augment-vir/common",
|
|
3
|
-
"version": "30.0.
|
|
3
|
+
"version": "30.0.1",
|
|
4
|
+
"description": "A collection of augments, helpers types, functions, and classes for any JavaScript environment.",
|
|
5
|
+
"keywords": [
|
|
6
|
+
"augment",
|
|
7
|
+
"helper",
|
|
8
|
+
"util",
|
|
9
|
+
"node",
|
|
10
|
+
"browser",
|
|
11
|
+
"backend",
|
|
12
|
+
"frontend",
|
|
13
|
+
"vir",
|
|
14
|
+
"augment-vir"
|
|
15
|
+
],
|
|
4
16
|
"homepage": "https://github.com/electrovir/augment-vir",
|
|
5
17
|
"bugs": {
|
|
6
18
|
"url": "https://github.com/electrovir/augment-vir/issues"
|
|
@@ -20,17 +32,15 @@
|
|
|
20
32
|
"types": "dist/index.d.ts",
|
|
21
33
|
"scripts": {
|
|
22
34
|
"compile": "virmator compile",
|
|
23
|
-
"docs": "virmator docs",
|
|
24
35
|
"test": "concurrently --colors --kill-others-on-fail -c red,blue --names node,web \"npm run test:node\" \"npm run test:web\"",
|
|
25
36
|
"test:coverage": "virmator --no-deps test web coverage",
|
|
26
|
-
"test:docs": "virmator docs check",
|
|
27
37
|
"test:node": "virmator --no-deps test node",
|
|
28
38
|
"test:update": "npm test",
|
|
29
39
|
"test:web": "virmator --no-deps test web"
|
|
30
40
|
},
|
|
31
41
|
"dependencies": {
|
|
32
|
-
"@augment-vir/assert": "^30.0.
|
|
33
|
-
"@augment-vir/core": "^30.0.
|
|
42
|
+
"@augment-vir/assert": "^30.0.1",
|
|
43
|
+
"@augment-vir/core": "^30.0.1",
|
|
34
44
|
"@date-vir/duration": "^6.0.0",
|
|
35
45
|
"ansi-styles": "^6.2.1",
|
|
36
46
|
"json5": "^2.2.3",
|
|
@@ -1,2 +0,0 @@
|
|
|
1
|
-
import { type Falsy, type Truthy } from '@augment-vir/assert';
|
|
2
|
-
export declare function ifTruthy<const InputType, IfTruthyType, IfFalsyType>(checkThis: InputType, ifTruthyCallback: (truthyInput: Truthy<InputType>) => IfTruthyType, ifFalsyCallback: (truthyInput: Falsy<InputType>) => IfFalsyType): IfTruthyType | IfFalsyType;
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
export declare function safeMatch(input: string, regExp: RegExp): string[];
|