1.0.0 • Published 4 years ago

deadfish.js v1.0.0

Weekly downloads
-
License
CC0 1.0 Universal
Repository
github
Last release
4 years ago

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 commanddescription
"i"increments x
"d"decrements x
"s"squares x
"o"appends x to the output
new commandsdescription
"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

CC0 1.0 Universal

1.0.0

4 years ago