Skip to content

Commit 7602c74

Browse files
committed
Documentation update
1 parent 49e4f43 commit 7602c74

File tree

2 files changed

+4
-2
lines changed

2 files changed

+4
-2
lines changed

README.md

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -20,17 +20,19 @@ Currently defined tokens:
2020
* ')': Right bracket
2121

2222
```
23-
import {disj, impl, lcr} from "boolean-simp";
23+
import {disj, impl, lcr, evaluate} from "boolean-simp";
2424
console.log(disj("a+1+b|0"); // a+b
2525
console.log(disj("a|a+b")); // a|(a+b)
2626
console.log(impl("a|a+b")); // a
2727
console.log(lcr("1", ["a+b"])); // -(a+b) = -a | -b
28+
console.log(evaluate("a+b", ["a"], [])); // b
2829
```
2930

3031
## Functions
3132
* disj(rule): Transforms a rule into disjunctive normal form
3233
* impl(rule): Uses implications to mitigate terms
3334
* lcr(rule, Array of rules): Calculate long code rules from a given rule set
35+
* evaluate(rule, Array of truthy literals, Array of falsy literals, MakeOthers = null|TOKEN_FALSE|TOKEN_TRUE): Evaluates and/or simplifies the rule given the truthy/falsy literals. The parameter MakeOthers can be used for flagging literals which are neither in the truthy array nor in the falsy array.
3436

3537
## License
3638
MIT License

package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "boolean-simp",
3-
"version": "2.2.0",
3+
"version": "2.2.1",
44
"description": "Simplify boolean expressions",
55
"author": "Markus Gutbrod <gutbrod.markus@googlemail.com>",
66
"license": "MIT",

0 commit comments

Comments
 (0)