Execute bf code:
global.brainfuck("<code here>")
Get output:
let bf = global.brainfuck("+[.+]")
console.log(bf.output) // All ascii characters
Get other stuff:
let bf = global.brainfuck("+[.+]>++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++.")
console.log(bf.input) // Input code ("+[.+]>++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++.")
console.log(bf.lastCell) // The index of the last cell selected (1)
console.log(bf.cellArray) // The final array of cells ([0, 72, 0, 0, 0...])
The ,
character is not supported.