# arr-every
**Repository Path**: ArkTSCentralRepository/arr-every
## Basic Information
- **Project Name**: arr-every
- **Description**: arr-every 是一个小巧且更快速的替代方案,功能与原生的 Array.prototype.every 类似,但不支持可选的 thisArg 参数。
- **Primary Language**: Unknown
- **License**: MIT
- **Default Branch**: main
- **Homepage**: None
- **GVP Project**: No
## Statistics
- **Stars**: 0
- **Forks**: 0
- **Created**: 2024-11-21
- **Last Updated**: 2024-11-23
## Categories & Tags
**Categories**: Uncategorized
**Tags**: None
## README
# arr-every
基于[@arr/every](https://www.npmjs.com/package/@arr/every)原库1.0.1版本进行适配, 所有功能代码已经转换为`ArkTS`文件
## Install
```sh
ohpm install arr-every
```
## Description
> A tiny, faster alternative to native `Array.prototype.every`
:warning: Unlike native, `arr-every` does _not_ support the optional `thisArg` parameter!
## Usage
```typescript
import every from 'arr-every';
const isBigEnough = val => val >= 10;
every([12, 5, 8, 130, 44], isBigEnough);
//=> false
every([12, 54, 18, 130, 44], isBigEnough);
//=> true
```
## API
### every(arr, callback)
#### arr
Type: `Array`
The array to iterate upon.
#### callback(value[, index, array])
Type: `Function`
Function to test for each element, taking three arguments:
* **value** (required) -- The current element being processed in the array.
* **index** (optional) -- The index of the current element being processed in the array.
* **array** (optional) -- The array `every` was called upon.
## License
MIT © [Luke Edwards](http://lukeed.com)