# pure-conditions

> Utility methods for simple conditions

Latest version **1.2.3** (published 2025-12-02) · MIT license · 0 weekly downloads

## Install

```sh
npm install pure-conditions
pnpm add pure-conditions
yarn add pure-conditions
bun add pure-conditions
```

## Health

**Score 45/100 (D)** — status: stable.

Positive: no vulnerabilities.

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

## Facts

| | |
|---|---|
| Version | 1.2.3 |
| Published | 2025-12-02 |
| First published | 2018-06-05 |
| Weekly downloads | 0 |
| License | MIT |
| TypeScript types | none |
| Module format | CommonJS |
| Dependencies | 0 |
| Unpacked size | 55.3 KB |
| Known vulnerabilities | 0 |
| Install scripts | no |
| GitHub stars | 4 |
| Author | Emil Ajdyna |
| Maintainers | buxlabs-dev, emilos |
| Keywords | pure, utilities, javascript |

## Links

- npm: https://www.npmjs.com/package/pure-conditions
- Repository: https://github.com/buxlabs/pure-conditions
- Homepage: https://github.com/buxlabs/pure-conditions#readme
- Issues: https://github.com/buxlabs/pure-conditions/issues
- npm.io page: https://npm.io/package/pure-conditions

## Recent versions

- 1.2.3 (latest) — 2025-12-02
- 1.2.1 — 2020-11-17
- 1.2.0 — 2020-11-12
- 1.1.0 — 2020-05-12
- 1.0.5 — 2020-02-08
- 1.0.4 — 2019-11-29
- 1.0.3 — 2019-11-28
- 1.0.2 — 2019-11-09
- 1.0.1 — 2019-09-20
- 1.0.0 — 2019-09-20
- 0.1.21 — 2019-06-07
- 0.1.20 — 2019-05-21
- 0.1.19 — 2019-05-16
- 0.1.18 — 2019-03-26
- 0.1.17 — 2019-03-26
- … 17 more at https://npm.io/package/pure-conditions/versions

## README

# pure-conditions

[![npm](https://img.shields.io/npm/v/pure-conditions.svg)](https://www.npmjs.com/package/pure-conditions)
[![build](https://github.com/buxlabs/pure-conditions/workflows/build/badge.svg)](https://github.com/buxlabs/pure-conditions/actions)

> A set of pure functions.

## Table of Contents

- [Background](#background)
- [Install](#install)
- [Usage](#usage)
- [Maintainers](#maintainers)
- [Contributing](#contributing)
- [License](#license)

## Background

The library is a set of functions that can make developement easier by handling the most popular condition statements. Functions are pure, which means that they do not have side effects and have predictible output. The functions are isolated and do not depend on each other which makes it easier for bundlers and compilers to consume them.

## Install

```
npm install pure-conditions
```

## Usage

```js
const { hasDuplicates } = require('pure-conditions')
hasDuplicates(['foo', 'foo']) // true
```

```js
const { isEmpty } = require('pure-conditions')
isEmpty({ foo: 'bar' }) // false
```

```js
const { endsWith } = require('pure-conditions')
endsWith('foo bar', 'bar') // true
```

```js
const { isEmail } = require('pure-conditions')
isEmail('foobar@gmail.com') // true
```

## Maintainers

[@emilos](https://github.com/emilos)

## Contributing
Pull requests and issues are always welcome.

## License
MIT

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