Skip to content

Commit

Permalink
Initial truuu cli (#13)
Browse files Browse the repository at this point in the history
  • Loading branch information
aaronccasanova committed Jun 11, 2022
1 parent 4775006 commit d694f4b
Show file tree
Hide file tree
Showing 10 changed files with 517 additions and 1 deletion.
5 changes: 5 additions & 0 deletions .changeset/early-buses-chew.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
---
'truuu': patch
---

Initial truuu package
215 changes: 214 additions & 1 deletion package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

10 changes: 10 additions & 0 deletions packages/truuu/.babelrc.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
{
"presets": [
[
"@aacc/babel-preset",
{
"typescript": true
}
]
]
}
12 changes: 12 additions & 0 deletions packages/truuu/.eslintrc.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
/**
* @type {import('eslint').Linter.Config}
*/
module.exports = {
root: true,
extends: ['@aacc/eslint-config/typescript'],
parserOptions: {
tsconfigRootDir: __dirname,
project: 'tsconfig.eslint.json',
},
ignorePatterns: ['node_modules', 'dist'],
}
33 changes: 33 additions & 0 deletions packages/truuu/README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,33 @@
# TRUUU

Generates a truth table from a JavaScript condition.

## Install

```sh
npm i -g truuu
```

## Usage

```sh
$ truuu 'isFoo && !isBar'
╔══════════════════════════════════════════════╗
║ _____ ____ _ _ _ _ _ _ ║
|_ _| _ \| | | | | | | | | |
| | | |_) | | | | | | | | | |
| | | _ <| |_| | |_| | |_| |
|_| |_| \_\\___/ \___/ \___/ ║
║ ║
╟────────────────────┬───────┬─────────────────╢
║ isFoo │ isBar │ isFoo && !isBar ║
╟────────────────────┼───────┼─────────────────╢
falsefalsefalse
╟────────────────────┼───────┼─────────────────╢
falsetruefalse
╟────────────────────┼───────┼─────────────────╢
truefalsetrue
╟────────────────────┼───────┼─────────────────╢
truetruefalse
╚════════════════════╧═══════╧═════════════════╝
```

0 comments on commit d694f4b

Please sign in to comment.