# @iterables/any

> Return true if any element of an iterable matches.

Latest version **1.0.1** (published 2017-04-08) · MIT license · 0 weekly downloads

## Install

```sh
npm install @iterables/any
pnpm add @iterables/any
yarn add @iterables/any
bun add @iterables/any
```

## Health

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

Positive: no vulnerabilities.

Warnings: low downloads; no types; no esm support.

Negative: abandoned; low maintenance score.

## Facts

| | |
|---|---|
| Version | 1.0.1 |
| Published | 2017-04-08 |
| First published | 2017-04-08 |
| Weekly downloads | 0 |
| License | MIT |
| TypeScript types | none |
| Module format | CommonJS |
| Dependencies | 0 |
| Known vulnerabilities | 0 |
| Install scripts | no |
| GitHub stars | 2 |
| Author | Chris Dickinson |
| Maintainers | chrisdickinson |

## Links

- npm: https://www.npmjs.com/package/@iterables/any
- Repository: https://github.com/chrisdickinson/iterables-any
- Homepage: https://github.com/chrisdickinson/iterables-any#readme
- Issues: https://github.com/chrisdickinson/iterables-any/issues
- npm.io page: https://npm.io/package/@iterables/any

## Recent versions

- 1.0.1 (latest) — 2017-04-08

## README

# @iterables/any

Return true if any element of an iterable matches.

```javascript
const any = require('@iterables/any')

any('abc', xs => xs === 'c') // true
any('abc', xs => xs === 'd') // false
any([null, false, '']) // false
any([null, false, {}]) // true
```

## Installation

```
$ npm install --save @iterables/any
```

## API

### `any(iterable, test = Boolean) -> Iterator`

* `iterable`: any `Iterator` — a generator instance, `Array`, `Map`, `String`, or `Set`
* `test`: A function taking `xs` and returning a boolean value.

Returns `true` if any element matched `test`, or `false` if no element matched.

Stops consuming elements from `iterable` as soon as they pass `test`.

## License

MIT

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