1.0.0 • Published 4 years ago
deadfish.js v1.0.0
deadfish
A javascript interpreter for "DeadFish!" with added features.
Installation
Use npm to install deadfish.
npm i deadfish
Alternitavely, you can also install deadfish with yarn
yarn add deadfish
USAGE:
Note: i removed the 0 and 256 cap the original version had. x can be whatever now.
this version of deadfish includes 4 original commands and 3 new ones.
these are:
original command | description |
---|---|
"i" | increments x |
"d" | decrements x |
"s" | squares x |
"o" | appends x to the output |
new commands | description |
---|---|
"c" | sets x to 0; |
"r" | sets x to the root of itself. (to the nearest int) |
"h" | halts the program and logs the output |
Example:
const deadfish = require("deadfish");
deadfish("iiiiiiiiiroh");
// returns the square root of 9 (3)
deadfish("iiiiiiiiroh");
// returns the square root of 8 to the nearest whole (3)
contributeing
Pull requests are welcome. For major changes, please open an issue first to discuss what you would like to change.
Please make sure to update tests as appropriate.
License
1.0.0
4 years ago