From c7e3bed57a4d67c0b8922d6ca218255c826136ef Mon Sep 17 00:00:00 2001 From: amber williams Date: Wed, 3 May 2023 17:53:23 +0100 Subject: [PATCH] feat(demo): Add math commands --- demo.tape | 12 +++++++++++- index.js | 2 +- 2 files changed, 12 insertions(+), 2 deletions(-) diff --git a/demo.tape b/demo.tape index a67e23b..53b5939 100644 --- a/demo.tape +++ b/demo.tape @@ -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 diff --git a/index.js b/index.js index f5acff5..2088f55 100644 --- a/index.js +++ b/index.js @@ -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"); }