@lntvow/utils 2.4.7 → 3.0.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.
Files changed (2) hide show
  1. package/dist/index.d.ts +6 -6
  2. package/package.json +6 -3
package/dist/index.d.ts CHANGED
@@ -1,4 +1,4 @@
1
- export declare type AnyObj = Record<string, any>;
1
+ export declare type AnyObject = Record<string, any>;
2
2
 
3
3
  /**
4
4
  * @description url追加查询字符串
@@ -9,7 +9,7 @@ export declare type AnyObj = Record<string, any>;
9
9
  * appendQueryString('https://www.baidu.com', { a: '1', b: '2' }) => 'https://www.baidu.com?a=1&b=2'
10
10
  * appendQueryString('/pages/index?id=10', { test:'23' }) => '/pages/index?id=10&test=23'
11
11
  */
12
- declare function appendQueryString(url: string, obj: AnyObj, options?: StringifyOptions): string;
12
+ declare function appendQueryString(url: string, obj: AnyObject, options?: StringifyOptions): string;
13
13
 
14
14
  export declare type Arrayable<T> = T | T[];
15
15
 
@@ -22,7 +22,7 @@ export declare type ArrayItem<T> = T extends (infer U)[] ? U : never;
22
22
  */
23
23
  export declare function castArray<T>(target: T | T[]): T[];
24
24
 
25
- export declare function compareProperties(target: AnyObj, source: AnyObj): void | AnyObj;
25
+ export declare function compareProperties(target: AnyObject, source: AnyObject): void | AnyObject;
26
26
 
27
27
  /**
28
28
  * @description compose
@@ -62,7 +62,7 @@ export declare function deepClone<T>(target: T): T;
62
62
  * @param options 配置对象
63
63
  * @example deepMerge({ name: 1, obj: { name: '默认' , text: '旧值' }, arr: [1, 2, 3] }, { name: 1, obj: { name: '修改', age: '新增' }, test: 'test' }) => { name: 1, obj: { name: '修改', text: '旧值', age: '新增' }, arr: [1, 2, 3], test: 'test' }
64
64
  */
65
- export declare function deepMerge(template: AnyObj, source: AnyObj, options?: DeepMergeOptions): any;
65
+ export declare function deepMerge(template: AnyObject, source: AnyObject, options?: DeepMergeOptions): any;
66
66
 
67
67
  declare interface DeepMergeOptions {
68
68
  /**
@@ -87,7 +87,7 @@ export declare const error: (...arg: unknown[]) => void;
87
87
  * @param properties 要排除的属性
88
88
  * @example excludeProperties({ a: 1, b: 2, c: 3 }, ['a', 'b']) => { c: 3 }
89
89
  */
90
- export declare function excludeProperties<T extends AnyObj, K extends keyof T>(target: T, properties: Arrayable<K>): Omit<T, K>;
90
+ export declare function excludeProperties<T extends AnyObject, K extends keyof T>(target: T, properties: Arrayable<K>): Omit<T, K>;
91
91
 
92
92
  /**
93
93
  * @description 提取对象中的某些属性
@@ -95,7 +95,7 @@ export declare function excludeProperties<T extends AnyObj, K extends keyof T>(t
95
95
  * @param properties 要提取的属性
96
96
  * @example extractProperties({ a: 1, b: 2, c: 3 }, ['a', 'b']) => { a: 1, b: 2 }
97
97
  */
98
- export declare function extractProperties<T extends AnyObj, K extends keyof T>(target: T, properties: Arrayable<K>): Pick<T, K>;
98
+ export declare function extractProperties<T extends AnyObject, K extends keyof T>(target: T, properties: Arrayable<K>): Pick<T, K>;
99
99
 
100
100
  export declare interface FloatOptions {
101
101
  /**
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@lntvow/utils",
3
- "version": "2.4.7",
3
+ "version": "3.0.0",
4
4
  "description": "工具库",
5
5
  "type": "module",
6
6
  "license": "MIT",
@@ -11,9 +11,12 @@
11
11
  "main": "dist/index.cjs",
12
12
  "module": "dist/index.mjs",
13
13
  "types": "dist/index.d.ts",
14
+ "engines": {
15
+ "node": ">=18.12.0",
16
+ "pnpm": ">=9.0.0"
17
+ },
14
18
  "dependencies": {
15
- "dayjs": "^1.11.10",
16
- "is-even": "^1.0.0"
19
+ "dayjs": "^1.11.10"
17
20
  },
18
21
  "devDependencies": {
19
22
  "@lntvow/dev": "^0.2.4",