# aureooms-js-predicate

> predicate code bricks for JavaScript

Latest version **2.0.2** (published 2015-10-10) · AGPL-3.0 license · 0 weekly downloads

> **Deprecated.** This package is deprecated.

## Install

```sh
npm install aureooms-js-predicate
pnpm add aureooms-js-predicate
yarn add aureooms-js-predicate
bun add aureooms-js-predicate
```

## Health

**Score 10/100 (F)** — status: deprecated.

Negative: deprecated.

## Facts

| | |
|---|---|
| Version | 2.0.2 |
| Published | 2015-10-10 |
| First published | 2015-02-05 |
| Weekly downloads | 0 |
| License | AGPL-3.0 |
| TypeScript types | none |
| Module format | CommonJS |
| Dependencies | 0 |
| Known vulnerabilities | 0 |
| Install scripts | no |
| Author | aureooms |
| Maintainers | aureooms |
| Keywords | bricks, javascript, js, boolean, logic, predicate, truth, untruth, negation, conjunction, disjunction, implication, equivalence, ender |

## Links

- npm: https://www.npmjs.com/package/aureooms-js-predicate
- Repository: https://github.com/aureooms/js-predicate
- Homepage: http://aureooms.github.io/js-predicate/
- Issues: https://github.com/aureooms/js-predicate/issues
- npm.io page: https://npm.io/package/aureooms-js-predicate

## Alternatives

- [@mapbox/jsonlint-lines-primitives](https://npm.io/package/@mapbox/jsonlint-lines-primitives.md) — 5.3M weekly downloads
- [reftools](https://npm.io/package/reftools.md) — 3.5M weekly downloads
- [@hey-api/openapi-ts](https://npm.io/package/@hey-api/openapi-ts.md) — 3.5M weekly downloads
- [@mapbox/geojson-rewind](https://npm.io/package/@mapbox/geojson-rewind.md) — 2.4M weekly downloads
- [turbo-stream](https://npm.io/package/turbo-stream.md) — 1.7M weekly downloads

## Recent versions

- 2.0.2 (latest) — 2015-10-10
- 2.0.1 — 2015-04-22
- 2.0.0 — 2015-04-21
- 1.0.1 — 2015-02-11
- 1.0.0 — 2015-02-05
- 0.0.1 — 2015-02-05

## README

[js-predicate](http://aureooms.github.io/js-predicate)
==

Predicate code bricks for JavaScript.

[![NPM license](http://img.shields.io/npm/l/aureooms-js-predicate.svg?style=flat)](https://raw.githubusercontent.com/aureooms/js-predicate/master/LICENSE)
[![NPM version](http://img.shields.io/npm/v/aureooms-js-predicate.svg?style=flat)](https://www.npmjs.org/package/aureooms-js-predicate)
[![Bower version](http://img.shields.io/bower/v/aureooms-js-predicate.svg?style=flat)](http://bower.io/search/?q=aureooms-js-predicate)
[![Build Status](http://img.shields.io/travis/aureooms/js-predicate.svg?style=flat)](https://travis-ci.org/aureooms/js-predicate)
[![Coverage Status](http://img.shields.io/coveralls/aureooms/js-predicate.svg?style=flat)](https://coveralls.io/r/aureooms/js-predicate)
[![Dependencies Status](http://img.shields.io/david/aureooms/js-predicate.svg?style=flat)](https://david-dm.org/aureooms/js-predicate#info=dependencies)
[![devDependencies Status](http://img.shields.io/david/dev/aureooms/js-predicate.svg?style=flat)](https://david-dm.org/aureooms/js-predicate#info=devDependencies)
[![Code Climate](http://img.shields.io/codeclimate/github/aureooms/js-predicate.svg?style=flat)](https://codeclimate.com/github/aureooms/js-predicate)
[![NPM downloads per month](http://img.shields.io/npm/dm/aureooms-js-predicate.svg?style=flat)](https://www.npmjs.org/package/aureooms-js-predicate)
[![GitHub issues](http://img.shields.io/github/issues/aureooms/js-predicate.svg?style=flat)](https://github.com/aureooms/js-predicate/issues)
[![Inline docs](http://inch-ci.org/github/aureooms/js-predicate.svg?branch=master&style=shields)](http://inch-ci.org/github/aureooms/js-predicate)

Can be managed through [jspm](https://github.com/jspm/jspm-cli),
[duo](https://github.com/duojs/duo),
[component](https://github.com/componentjs/component),
[bower](https://github.com/bower/bower),
[ender](https://github.com/ender-js/Ender),
[jam](https://github.com/caolan/jam),
[spm](https://github.com/spmjs/spm),
and [npm](https://github.com/npm/npm).

## Install

### jspm
```terminal
jspm install github:aureooms/js-predicate
# or
jspm install npm:aureooms-js-predicate
```
### duo
No install step needed for duo!

### component
```terminal
component install aureooms/js-predicate
```

### bower
```terminal
bower install aureooms-js-predicate
```

### ender
```terminal
ender add aureooms-js-predicate
```

### jam
```terminal
jam install aureooms-js-predicate
```

### spm
```terminal
spm install aureooms-js-predicate --save
```

### npm
```terminal
npm install aureooms-js-predicate --save
```

## Require
### jspm
```js
let predicate = require( "github:aureooms/js-predicate" ) ;
// or
import predicate from 'aureooms-js-predicate' ;
```
### duo
```js
let predicate = require( "aureooms/js-predicate" ) ;
```

### component, ender, spm, npm
```js
let predicate = require( "aureooms-js-predicate" ) ;
```

### bower
The script tag exposes the global variable `predicate`.
```html
<script src="bower_components/aureooms-js-predicate/js/dist/predicate.min.js"></script>
```
Alternatively, you can use any tool mentioned [here](http://bower.io/docs/tools/).

### jam
```js
require( [ "aureooms-js-predicate" ] , function ( predicate ) { ... } ) ;
```

## Use

```js
const {
	lt , le , gt ,
	truth , untruth ,
	negation ,
	conjunction , disjunction ,
	implication
} = predicate ;

let p = gt( 5 ) ;
p( 5 ) ; // false
p( 6 ) ; // true

let q = lt( 7 ) ;
q( 6 ) ; // true
q( 7 ) ; // false

let r = conjunction( p , q ) ;
r( 5 ) ; // false
r( 6 ) ; // true
r( 7 ) ; // false

let s = negation( r ) ;
s( 5 ) ; // true
s( 6 ) ; // false
s( 7 ) ; // true

let t = equivalence( p , negation( le( 5 ) ) ) ;
t( ... ) ; // true

let u = implication( negation( q ) , p ) ;
u( ... ) ; // true

let v = disjunction( truth , untruth ) ;
v( ... ) ; // true
```

## References

  - https://github.com/jamestalmage/predicate-js

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