Skip to content

Commit

Permalink
Examples
Browse files Browse the repository at this point in the history
  • Loading branch information
BBB committed Apr 3, 2023
1 parent 514a742 commit a126875
Showing 1 changed file with 19 additions and 0 deletions.
19 changes: 19 additions & 0 deletions README.md
Expand Up @@ -11,8 +11,27 @@ Available now
`and-or4t` allows you to build 2d arrays of options to iterate over

```typescript
import {Single} from "and-or4t"

const one = new Single("ONE");
const two = new Single("TWO");
const three = new Single("THREE");

console.log(one.and(two).and(three));
/**
* Gives us:
* [["ONE", "TWO", "THREE"]]
*/

console.log(one.or(two).or(three));
/**
* Gives us:
* [["ONE"], ["TWO"], ["THREE"]]
*/
console.log(one.or(two.and(three)));

/**
* Gives us:
* [["ONE"], ["TWO", "THREE"]]
*/
```

0 comments on commit a126875

Please sign in to comment.