js-brainfuck
TypeScript icon, indicating that this package has built-in type declarations

1.0.6 • Public • Published

js-brainfuck

js-brainfuck is a simple Node module for interpreting BrainFuck

Example use:
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 "@"

});

Running brainfuck() will return a Promise<string>

Package Sidebar

Install

npm i js-brainfuck

Weekly Downloads

1

Version

1.0.6

License

ISC

Unpacked Size

4.51 kB

Total Files

4

Last publish

Collaborators

  • erdi