commonly-used-utils
Advanced tools
Comparing version 1.0.0-beat12 to 1.0.0-beat13
{ | ||
"name": "commonly-used-utils", | ||
"version": "1.0.0-beat12", | ||
"version": "1.0.0-beat13", | ||
"description": "", | ||
@@ -5,0 +5,0 @@ "main": "dist/index.js", |
### 1.0.0-beat11 | ||
#### 2023/6/5 | ||
1. 注释完善 | ||
1. 注释完善 | ||
### 1.0.0-beat13 | ||
#### 2023/6/21 | ||
1. 泛型声明 |
@@ -21,6 +21,6 @@ // 是否为对象 | ||
*/ | ||
export function oneDimensional ( | ||
array: object[], | ||
export function oneDimensional <T> ( | ||
array: T[], | ||
children?: 'children' | string | ||
): any[] | ||
): T[] | ||
@@ -39,4 +39,4 @@ /** | ||
*/ | ||
export function treeFindParents ( | ||
array: any[], | ||
export function treeFindParents <T> ( | ||
array: T[], | ||
value: string | number | undefined, | ||
@@ -47,3 +47,3 @@ attr?: 'id' | string, | ||
self?: boolean | ||
): any[] | void | ||
): T[] | void | ||
@@ -62,4 +62,4 @@ /** | ||
*/ | ||
export function findArrayAttr ( | ||
array: any[], | ||
export function findArrayAttr <T> ( | ||
array: T[], | ||
value?: string | number | undefined, | ||
@@ -69,3 +69,3 @@ attr?: 'id' | string, | ||
isStrict?: boolean | ||
): object | string | void | ||
): T | string | void | number | ||
@@ -122,3 +122,3 @@ /** | ||
*/ | ||
export function setTreeAttr(array, callback, children?: 'children' | string) | ||
export function setTreeAttr(array, callback, children?: 'children' | string): void | ||
@@ -147,2 +147,2 @@ /** | ||
*/ | ||
export function deleteRecursively(array, callback, children?: 'children' | string) | ||
export function deleteRecursively(array, callback, children?: 'children' | string): void |
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
23614
7