# any

> Returns `true` if a value exists in the given string, array or object.

Latest version **1.0.0** (published 2015-02-27) · MIT license · 0 weekly downloads

## Install

```sh
npm install any
pnpm add any
yarn add any
bun add 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.0 |
| Published | 2015-02-27 |
| First published | 2014-10-08 |
| Weekly downloads | 0 |
| License | MIT |
| TypeScript types | none |
| Module format | CommonJS |
| Node | >=0.10.0 |
| Dependencies | 2 |
| Known vulnerabilities | 0 |
| Install scripts | no |
| GitHub stars | 5 |
| Author | Jon Schlinkert |
| Maintainers | jonschlinkert |
| Keywords | array, check, contains, detect, find, has, has-own, hasown, is, is-object, isobject, key, keys, lookup, object, own, pick, prop, properties, property, props, string, type, type-of, typeof, util, utilities, utility, utils, value |

## Links

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

## Dependencies (2)

- [for-own](https://npm.io/package/for-own.md) ^0.1.2
- [make-iterator](https://npm.io/package/make-iterator.md) ^0.1.0

## Alternatives

- [memory-cache](https://npm.io/package/memory-cache.md) — 795.0K weekly downloads
- [@httptoolkit/proxy-agent](https://npm.io/package/@httptoolkit/proxy-agent.md) — 11.2K weekly downloads
- [express-cache-controller](https://npm.io/package/express-cache-controller.md) — 5.3K weekly downloads
- [http-cache-middleware](https://npm.io/package/http-cache-middleware.md) — 4.5K weekly downloads
- [cache2](https://npm.io/package/cache2.md) — 1.5K weekly downloads

## Recent versions

- 1.0.0 (latest) — 2015-02-27
- 0.1.2 — 2014-11-04
- 0.1.0 — 2014-10-08

## README

# any [![NPM version](https://badge.fury.io/js/any.svg)](http://badge.fury.io/js/any)  [![Build Status](https://travis-ci.org/jonschlinkert/any.svg)](https://travis-ci.org/jonschlinkert/any) 

> Returns `true` if a value exists in the given string, array or object.

- if a callback is passed, checks to see if a truthy value is returned for any element in a collection or for any sub-string in a string.
- returns as soon as it finds a passing value and does not iterate over the entire collection.

## Install with [npm](npmjs.org)

```bash
npm i any --save
```


## Usage

```js
var any = require('any');
```

```js
any('a-b-c', 'a');
//=> true

any('a-b-c', 'd');
//=> false

any({a: 'b', c: 'd'}, 'a');
//=> true

any([{a: 'b', c: 'd'}], {a: 'b'});
//=> true

any('a-b-c', 'd');
//=> false
```

## Running tests
Install dev dependencies.

```bash
npm i -d && npm test
```


## Author

**Jon Schlinkert**
 
+ [github/jonschlinkert](https://github.com/jonschlinkert)
+ [twitter/jonschlinkert](http://twitter.com/jonschlinkert) 

## License
Copyright (c) 2015 Jon Schlinkert  
Released under the MIT license

***

_This file was generated by [verb](https://github.com/assemble/verb) on February 26, 2015._

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