@cclr/lang 0.1.2 → 0.1.3

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.
@@ -1,7 +1,7 @@
1
1
  // eslint-disable-next-line @typescript-eslint/no-explicit-any
2
- type TAny$1 = any;
3
- type TPlainObject = Record<string, TAny$1>;
4
- type TPlainFunction = (...args: TAny$1[]) => TAny$1;
2
+ type TAny = any;
3
+ type TPlainObject = Record<string, TAny>;
4
+ type TPlainFunction = (...args: TAny[]) => TAny;
5
5
 
6
6
  declare const VAL_TYPE: {
7
7
  readonly boolean: "boolean";
@@ -45,10 +45,10 @@ declare function isFunction(b: unknown): b is TPlainFunction;
45
45
  */
46
46
  declare function isPlainObject(b: unknown): b is Record<string, unknown>;
47
47
  declare function isObject(b: unknown): b is Record<string, unknown>;
48
- declare function isArray(a: unknown): a is TAny$1[];
48
+ declare function isArray(a: unknown): a is TAny[];
49
49
 
50
50
  // eslint-disable-next-line @typescript-eslint/no-explicit-any
51
- type TAny = any;
51
+ type TAny$1 = any;
52
52
 
53
53
  /**
54
54
  * () => {};
@@ -65,7 +65,7 @@ declare const noop: () => void;
65
65
  * function: noop,
66
66
  * regexp: /(?:)/,
67
67
  */
68
- declare const defaultValue: Partial<Record<TVal, TAny>>;
68
+ declare const defaultValue: Partial<Record<TVal, TAny$1>>;
69
69
 
70
70
  /**
71
71
  * Check if an object has a property.
@@ -98,7 +98,7 @@ declare const extend: <T extends object, J extends object>(sourceObj: T & Partia
98
98
  * @param filter
99
99
  * @returns
100
100
  */
101
- declare const filter: <T extends object, K extends keyof T>(sourceObj: T, filter?: (val: TAny$1, key: K) => boolean) => Partial<T>;
101
+ declare const filter: <T extends object, K extends keyof T>(sourceObj: T, filter?: (val: TAny, key: K) => boolean) => Partial<T>;
102
102
 
103
103
  /**
104
104
  * 遍历对象
@@ -114,7 +114,7 @@ declare const forEach: <T extends object, K extends keyof T>(obj: T, callback: (
114
114
  * @param formatOptionList [ key, 类型, 默认值? ]
115
115
  * @returns 格式化之后的原对象
116
116
  */
117
- declare const format: <T extends object, K extends keyof T>(object: T, formatOptionList: ([K, TVal, TAny$1] | [K, TVal])[]) => T;
117
+ declare const format: <T extends object, K extends keyof T>(object: T, formatOptionList: ([K, TVal, TAny] | [K, TVal])[]) => T;
118
118
 
119
119
  /**
120
120
  * 对象挑选
@@ -141,4 +141,4 @@ declare namespace index {
141
141
  */
142
142
  declare const set: (source: object | null | undefined, path: string, value: any) => object;
143
143
 
144
- export { type TAny$1 as TAny, type TPlainFunction, type TPlainObject, type TVal, VAL_TYPE, defaultValue, get, getParamType, hasOwn, isArray, isBoolean, isFunction, isNull, isObject, isPlainObject, isString, isSymbol, isType, isUndefined, isUndefinedOrNull, noop, index as obj, set, toString };
144
+ export { type TAny, type TPlainFunction, type TPlainObject, type TVal, VAL_TYPE, defaultValue, get, getParamType, hasOwn, isArray, isBoolean, isFunction, isNull, isObject, isPlainObject, isString, isSymbol, isType, isUndefined, isUndefinedOrNull, noop, index as obj, set, toString };
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@cclr/lang",
3
- "version": "0.1.2",
3
+ "version": "0.1.3",
4
4
  "description": "js语言基础工具",
5
5
  "author": "cclr <18843152354@163.com>",
6
6
  "homepage": "",
@@ -27,5 +27,5 @@
27
27
  "g:test": "vitest run",
28
28
  "g:build": "ccf build"
29
29
  },
30
- "gitHead": "361f93f5ddccff3c90ee52b0698e289dd7c699a2"
30
+ "gitHead": "756346e96b198cbc70acc052058123826f59f5ed"
31
31
  }