# @codewell/and

> Check if all conditions or booleans are true

Latest version **1.0.0** (published 2019-11-20) · MIT license · 0 weekly downloads

## Install

```sh
npm install @codewell/and
pnpm add @codewell/and
yarn add @codewell/and
bun add @codewell/and
```

## 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 | 2019-11-20 |
| First published | 2019-11-20 |
| Weekly downloads | 0 |
| License | MIT |
| TypeScript types | none |
| Module format | CommonJS |
| Dependencies | 0 |
| Unpacked size | 3.6 KB |
| Known vulnerabilities | 0 |
| Install scripts | no |
| GitHub stars | 0 |
| Author | Filip Johansson |
| Maintainers | fippli |

## Links

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

## Recent versions

- 1.0.0 (latest) — 2019-11-20

## README

# @codewell/and
Check if all conditions or booleans are true.
First parameter should be an array of booleans. Second determines what should be returned if the input is `[]`, `undefied` or `null`. Options are `false`, `'false'` or `throw`.

## Installation
```
npm install @codewell/and
```

## Basic usage
```JavaScript
import and from '@codewell/and';

and([true, true, true]) // => true
and([true, true, false]) // => false
and([]) // => true

and([], 'false') // => false
and([], false) // => false
and([], 'throw') // => throws error

and(undefined, 'false') // => false
and(undefined, false) // => false
and(undefined, 'throw') // => throws error

and(null, 'false') // => false
and(null, false) // => false
and(null, 'throw') // => throws error
```

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