js-brainfuck
v1.0.6
Published
BrainFuck interpreter for JavaScript
Downloads
3
Maintainers
Readme
const { brainfuck } = require("js-brainfuck");
const brainfuckCode = "++++++++[>++++++++<-]>."; // prints ASCII 64: @
const brainfuckOptions = {
input: "", // Input. The , operator reads a single character from this every time it's called
invalidCommandError: true // Whether or not to throw an error when an invalid command/operator is reached. (Default: false)
};
brainfuck(brainfuckCode, brainfuckOptions).then(output => {
console.log(output); // Logs the output. In this case, the output will be "@"
});