commit 7e2bda8ef8a73326750da8d4967d507ef0496050 parent 9739d3cffc1e6342505d968ed93a2f2302f92643 Author: tongong <tongong@gmx.net> Date: Wed, 25 May 2022 11:00:08 +0200 simplified calculator script Diffstat:
M | scripts/calc | | | 6 | ------ |
1 file changed, 0 insertions(+), 6 deletions(-)
diff --git a/scripts/calc b/scripts/calc @@ -1,11 +1,5 @@ #!/usr/bin/env node -console.log("\x1b[1;33mtongong's node calculator script\x1b[0m") -console.log(" - basic Javascript math functions"); -console.log(" - functions from the JS Math module"); -console.log(" - s(x): shorthand for sqrt(x)"); -console.log(" - l(x): shorthand for console.log(x)"); - r=require('repl').start({prompt:'> '}).context; Object.getOwnPropertyNames(Math).forEach(a=>{r[a]=Math[a]});