# truth-table-parser

> A REPL tool and library for generating truth tables from a logical proposition (see examples).

Latest version **1.0.8** (published 2022-05-25) · MIT license · 0 weekly downloads

## Install

```sh
npm install truth-table-parser
pnpm add truth-table-parser
yarn add truth-table-parser
bun add truth-table-parser
```

Provides the command `truth-table-parser`.

## Health

**Score 30/100 (F)** — status: abandoned.

Positive: has types; esm support; no vulnerabilities; high quality score.

Warnings: low downloads.

Negative: abandoned; low maintenance score.

## Facts

| | |
|---|---|
| Version | 1.0.8 |
| Published | 2022-05-25 |
| First published | 2021-05-05 |
| Weekly downloads | 0 |
| License | MIT |
| TypeScript types | bundled |
| Module format | ESM + CommonJS |
| Dependencies | 2 |
| Unpacked size | 50.7 KB |
| Known vulnerabilities | 0 |
| Install scripts | no |
| Author | Fraol Lemecha |
| Maintainers | fraol |
| Keywords | cli |

## Links

- npm: https://www.npmjs.com/package/truth-table-parser
- npm.io page: https://npm.io/package/truth-table-parser

## Dependencies (2)

- [optionem](https://npm.io/package/optionem.md) ^0.2.5
- [console-table-printer](https://npm.io/package/console-table-printer.md) ^2.11.0

## Alternatives

- [@salesforce/cli](https://npm.io/package/@salesforce/cli.md) — 389.7K weekly downloads
- [@mintlify/cli](https://npm.io/package/@mintlify/cli.md) — 208.9K weekly downloads
- [@grafana/e2e-selectors](https://npm.io/package/@grafana/e2e-selectors.md) — 128.7K weekly downloads
- [mintlify](https://npm.io/package/mintlify.md) — 112.0K weekly downloads
- [@intlayer/cli](https://npm.io/package/@intlayer/cli.md) — 22.8K weekly downloads

## Recent versions

- 1.0.8 (latest) — 2022-05-25
- 1.0.7 — 2022-05-25
- 1.0.6 — 2022-05-25
- 1.0.5 — 2022-05-25
- 1.0.4 — 2022-05-21
- 1.0.3 — 2022-05-21
- 1.0.2 — 2022-05-20
- 1.0.1 — 2022-05-20
- 1.0.0 — 2022-05-19
- 0.0.1 — 2021-05-05

## README

# Truth Table Parser

A REPL tool and library for generating truth tables from a logical proposition (see examples).

## Demo

[![asciicast](https://asciinema.org/a/496113.svg)](https://asciinema.org/a/496113)

## Install

As a command line tool

```bash
npm install -g truth-table-parser
truth-table-parse # drops you into a REPL where you can run your propositions.
```

As a library

```bash
npm install truth-table-parser
```

## Examples

```text
> p
> !p
> p & q
> (!p) & q
> (p => q)
> !(p | q)
> (p <=> q)
> !(p => q)
> ((p => q) & (r => s))
```

## Backus-Naur Form (BNF)

The backus naur form for the syntax of a proposition.

```text
<TTP> ::= <PROPOSITION>*

<PROPOSITION> ::= <name> |
                  <UNARY-PROPOSITION> |
                  <BINARY-PROPOSITION>

<UNARY-PROPOSITION> ::= <UNARY-CONNECTIVE> <name> |
                        <UNARY-CONNECTIVE> <BINARY-PROPOSITION>

<BINARY-PROPOSITION> ::= "(" <PROPOSITION> <BINARY-CONNECTIVE> <PROPOSITION> ")"

<UNARY-CONNECTIVE> = "!"
<BINARY-CONNECTIVE> = "&" | "|" | "=>" | "<=>"
```

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