2.1.0 • Published 8 years ago

and-or-not v2.1.0

Weekly downloads
3
License
MIT
Repository
github
Last release
8 years ago

and-or-not

Example

The following code creates a predicate that returns true for numbers less than 15, and not less than 5, and divisible by either 2 or 3.

import { and, or, not } from 'and-or-not';
import { $lt, $mod } from 'and-or-not';

const predicate = and($lt(15), 
                      not($lt(5)),
                      or($mod(2), $mod(3)));

const values = [1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,16,17,18,19,20];

const matches = values.filter(predicate);
  
console.log(matches) // [6,8,9,10,12,14]
2.1.0

8 years ago

2.0.12

8 years ago

2.0.11

8 years ago

2.0.10

8 years ago

2.0.9

8 years ago

2.0.8

8 years ago

2.0.7

8 years ago

2.0.6

8 years ago

2.0.5

8 years ago

2.0.4

8 years ago

2.0.3

8 years ago

2.0.2

8 years ago

2.0.1

8 years ago

2.0.0

8 years ago

1.0.2

8 years ago

1.0.1

8 years ago

1.0.0

8 years ago