Skip to content

Commit

Permalink
feat(demo): Add math commands
Browse files Browse the repository at this point in the history
  • Loading branch information
Amber-Williams committed May 3, 2023
1 parent 2a9a58f commit c7e3bed
Show file tree
Hide file tree
Showing 2 changed files with 12 additions and 2 deletions.
12 changes: 11 additions & 1 deletion demo.tape
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,17 @@ Set MarginFill "#255dd9"
Set BorderRadius 5
Set WindowBar Colorful

# act
# act - calculator demo
Set TypingSpeed 0.02
Type "yall --math 12.7 cm to inch"
Enter
Sleep 900ms

Type "yall --math 12,000 + 4,000"
Enter
Sleep 900ms

# act - picklist demo
Set TypingSpeed 0.5
Type yall
Enter
Expand Down
2 changes: 1 addition & 1 deletion index.js
Original file line number Diff line number Diff line change
Expand Up @@ -45,7 +45,7 @@ program
let mathString = cmd.math + program.args.join(" ");
mathString = mathString.replaceAll(",", "").replaceAll("_", "");
mathResult = evaluate(mathString);
logger.info(`${mathResult}`);
logger.branded(`${mathResult}`);
} catch {
logger.error("Unable evaluate the provided equation");
}
Expand Down

0 comments on commit c7e3bed

Please sign in to comment.