0.0.1 • Published 1 year ago

ascii-exp v0.0.1

Weekly downloads
-
License
MIT
Repository
-
Last release
1 year ago

Expression in ASCII Art

A simple but powerful library which converts:

1+2/3^someFunction(4,5^((1/2)-3))/5^3

To

                   2                
     ────────────────────────────── 
                   ⎛             ⎞  
                   ⎜    ⎛   ⎞    ⎟  
                   ⎜    ⎜ 1 ⎟    ⎟  
                   ⎜    ⎜───⎟ - 3⎟  
                   ⎜    ⎜ 2 ⎟    ⎟  
                   ⎜    ⎝   ⎠    ⎟  
       someFunction⎜4, 5         ⎟  
                   ⎝             ⎠  
      3                             
1 + ────────────────────────────────
                    3               
                   5                

Usage

Command Line

npx ascii-exp <expression>

As a Library

const { render } = require("ascii-exp")
const rendered = render("1+2/3^someFunction(4,5^((1/2)-3))/5^3")
console.log(rendered)

Set up local dev environment

  1. Install node
  2. Install yarn
  3. make setup to install dev tools.
  4. make run to run ascii-seq locally.
  5. make test to run lint and unit tests.

Contributing

  1. Create a dev branch from main.
  2. Make code changes and make sure make build test passes.
  3. Commit the code changes and make a pull request.
0.0.1

1 year ago