Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

commonly-used-utils

Package Overview
Dependencies
Maintainers
1
Versions
29
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

commonly-used-utils - npm Package Compare versions

Comparing version 1.0.0-beat12 to 1.0.0-beat13

2

package.json
{
"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
SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc