@clerc/utils 0.24.0 → 0.25.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/index.d.ts +1 -9
- package/package.json +4 -1
package/dist/index.d.ts
CHANGED
|
@@ -1,14 +1,6 @@
|
|
|
1
1
|
import * as _clerc_core from '@clerc/core';
|
|
2
2
|
import { Command } from '@clerc/core';
|
|
3
3
|
|
|
4
|
-
/**
|
|
5
|
-
* Copied from type-fest
|
|
6
|
-
*/
|
|
7
|
-
type Primitive = null | undefined | string | number | boolean | symbol | bigint;
|
|
8
|
-
/**
|
|
9
|
-
* Copied from type-fest
|
|
10
|
-
*/
|
|
11
|
-
type LiteralUnion<LiteralType, BaseType extends Primitive> = LiteralType | (BaseType & Record<never, never>);
|
|
12
4
|
type Equals<X, Y> = (<T>() => T extends X ? 1 : 2) extends (<T>() => T extends Y ? 1 : 2) ? true : false;
|
|
13
5
|
type Dict<T> = Record<string, T>;
|
|
14
6
|
type ToArray<T> = T extends any[] ? T : [T];
|
|
@@ -31,4 +23,4 @@ declare const arrayStartsWith: <T>(arr: T[], start: T[]) => boolean;
|
|
|
31
23
|
declare const generateCommandRecordFromCommandArray: <C extends Command<string, _clerc_core.CommandOptions<string[], MaybeArray<string | typeof _clerc_core.Root>, _clerc_core.Flags>>>(commands: C[]) => Dict<C>;
|
|
32
24
|
declare const semanticArray: (arr: string[]) => string;
|
|
33
25
|
|
|
34
|
-
export { CamelCase, Dict, Enhance, Equals, GetLength, GetTail, KebabCase,
|
|
26
|
+
export { CamelCase, Dict, Enhance, Equals, GetLength, GetTail, KebabCase, MaybeArray, ToArray, arrayEquals, arrayStartsWith, camelCase, generateCommandRecordFromCommandArray, gracefulFlagName, gracefulVersion, kebabCase, semanticArray, toArray };
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@clerc/utils",
|
|
3
|
-
"version": "0.
|
|
3
|
+
"version": "0.25.0",
|
|
4
4
|
"author": "Ray <nn_201312@163.com> (https://github.com/so1ve)",
|
|
5
5
|
"description": "Clerc utils",
|
|
6
6
|
"keywords": [
|
|
@@ -44,6 +44,9 @@
|
|
|
44
44
|
"peerDependencies": {
|
|
45
45
|
"@clerc/core": "*"
|
|
46
46
|
},
|
|
47
|
+
"dependencies": {
|
|
48
|
+
"type-fest": "^3.5.1"
|
|
49
|
+
},
|
|
47
50
|
"scripts": {
|
|
48
51
|
"build": "puild",
|
|
49
52
|
"watch": "puild --watch"
|