# array-any-x

> Like Array.some but does not skip holes.

Latest version **1.1.2** (published 2019-08-28) · MIT license · 0 weekly downloads

## Install

```sh
npm install array-any-x
pnpm add array-any-x
yarn add array-any-x
bun add array-any-x
```

## Health

**Score 20/100 (F)** — status: abandoned.

Positive: esm support; no vulnerabilities.

Warnings: low downloads; no types.

Negative: abandoned; low maintenance score.

## Facts

| | |
|---|---|
| Version | 1.1.2 |
| Published | 2019-08-28 |
| First published | 2019-08-05 |
| Weekly downloads | 0 |
| License | MIT |
| TypeScript types | none |
| Module format | ESM + CommonJS |
| Node | >=8.11.4 |
| Dependencies | 5 |
| Unpacked size | 252.1 KB |
| Known vulnerabilities | 0 |
| Install scripts | no |
| GitHub stars | 0 |
| Author | Graham Fairweather |
| Maintainers | xotic750 |
| Keywords | array, any, module, javascript, nodejs, browser |

## Links

- npm: https://www.npmjs.com/package/array-any-x
- Repository: https://github.com/Xotic750/array-any-x
- Issues: https://github.com/Xotic750/array-any-x/issues
- npm.io page: https://npm.io/package/array-any-x

## Dependencies (5)

- [to-length-x](https://npm.io/package/to-length-x.md) ^4.2.2
- [to-object-x](https://npm.io/package/to-object-x.md) ^2.2.1
- [simple-call-x](https://npm.io/package/simple-call-x.md) ^1.0.3
- [assert-is-function-x](https://npm.io/package/assert-is-function-x.md) ^3.1.2
- [split-if-boxed-bug-x](https://npm.io/package/split-if-boxed-bug-x.md) ^2.1.2

## Alternatives

- [@opentelemetry/exporter-zipkin](https://npm.io/package/@opentelemetry/exporter-zipkin.md) — 14.8M weekly downloads
- [pusher-js](https://npm.io/package/pusher-js.md) — 2.0M weekly downloads
- [browserify](https://npm.io/package/browserify.md) — 1.7M weekly downloads
- [sqs-consumer](https://npm.io/package/sqs-consumer.md) — 1.7M weekly downloads
- [@sanity/eventsource](https://npm.io/package/@sanity/eventsource.md) — 930.8K weekly downloads

## Recent versions

- 1.1.2 (latest) — 2019-08-28
- 1.1.1 — 2019-08-20
- 1.1.0 — 2019-08-14
- 1.0.1 — 2019-08-05
- 1.0.0 — 2019-08-05

## README

<a
  href="https://travis-ci.org/Xotic750/array-any-x"
  title="Travis status">
<img
  src="https://travis-ci.org/Xotic750/array-any-x.svg?branch=master"
  alt="Travis status" height="18">
</a>
<a
  href="https://david-dm.org/Xotic750/array-any-x"
  title="Dependency status">
<img src="https://david-dm.org/Xotic750/array-any-x/status.svg"
  alt="Dependency status" height="18"/>
</a>
<a
  href="https://david-dm.org/Xotic750/array-any-x?type=dev"
  title="devDependency status">
<img src="https://david-dm.org/Xotic750/array-any-x/dev-status.svg"
  alt="devDependency status" height="18"/>
</a>
<a
  href="https://badge.fury.io/js/array-any-x"
  title="npm version">
<img src="https://badge.fury.io/js/array-any-x.svg"
  alt="npm version" height="18">
</a>
<a
  href="https://www.jsdelivr.com/package/npm/array-any-x"
  title="jsDelivr hits">
<img src="https://data.jsdelivr.com/v1/package/npm/array-any-x/badge?style=rounded"
  alt="jsDelivr hits" height="18">
</a>
<a
  href="https://bettercodehub.com/results/Xotic750/array-any-x"
  title="bettercodehub score">
<img src="https://bettercodehub.com/edge/badge/Xotic750/array-any-x?branch=master"
  alt="bettercodehub score" height="18">
</a>
<a
  href="https://coveralls.io/github/Xotic750/array-any-x?branch=master"
  title="Coverage Status">
<img src="https://coveralls.io/repos/github/Xotic750/array-any-x/badge.svg?branch=master"
  alt="Coverage Status" height="18">
</a>

<a name="module_array-any-x"></a>

## array-any-x

Tests whether some element passes the provided function.

<a name="exp_module_array-any-x--module.exports"></a>

### `module.exports` ⇒ <code>boolean</code> ⏏

This method tests whether any element in the array passes the test
implemented by the provided function.

**Kind**: Exported member  
**Returns**: <code>boolean</code> - `true` if the callback function returns a truthy value for
any array element; otherwise, `false`.  
**Throws**:

- <code>TypeError</code> If array is null or undefined.
- <code>TypeError</code> If callBack is not a function.

| Param     | Type                  | Description                                   |
| --------- | --------------------- | --------------------------------------------- |
| array     | <code>array</code>    | The array to iterate over.                    |
| callBack  | <code>function</code> | Function to test for each element.            |
| [thisArg] | <code>\*</code>       | Value to use as this when executing callback. |

**Example**

```js
import any from 'array-any-x';

function isBiggerThan10(element, index, array) {
  return element > 10;
}

console.log(any([2, 5, 8, 1, 4], isBiggerThan10)); // false
console.log(any([12, 5, 8, 1, 4], isBiggerThan10)); // true
```

---
_Source: https://npm.io/package/array-any-x · Machine-readable twin of the npm.io package page. Health data is recomputed on every publish._
