com-tools
Version:
com-tools 提供了一些通用的工具函数;
86 lines (40 loc) • 1.26 kB
Markdown
<!-- Do not edit this file. It is automatically generated by API Documenter. -->
[Home](./index.md) > [com-tools](./com-tools.md) > [array\_deleteUseTest](./com-tools.array_deleteusetest.md)
## array\_deleteUseTest() function
deleteUseTest(needDeleteTest) 根据测试函数批量删除数组的元素
**Signature:**
```typescript
export declare function array_deleteUseTest<T, ThisValue = T[]>(array: T[], needDeleteTest: ArrayCallbackFun<ThisValue, T, any>, thisValue?: ThisValue): T[];
```
## Parameters
<table><thead><tr><th>
Parameter
</th><th>
Type
</th><th>
Description
</th></tr></thead>
<tbody><tr><td>
array
</td><td>
T\[\]
</td><td>
</td></tr>
<tr><td>
needDeleteTest
</td><td>
[ArrayCallbackFun](./com-tools.arraycallbackfun.md)<!-- --><ThisValue, T, any>
</td><td>
: (currentValue,index,arr)=<!-- -->><!-- -->boolean 测试数组元素是否需要被删除的函数,返回 boolean 值,表示当前元素 currentValue 是否需要被删除;
</td></tr>
<tr><td>
thisValue
</td><td>
ThisValue
</td><td>
_(Optional)_
</td></tr>
</tbody></table>
**Returns:**
T\[\]
Array<Item> 被删除的元素的数组