Write the fcking Brainfck code and run the f-ck. Demo page.
Brainfuckme supports client and server usage.
For client (browser), use simply grab lib/brainfuckme.js
and add <script src="path/to/brainfuckme.js"></script>
For server (node), use npm command npm install brainfuckme
var bfkme = new Brainfuckme();
bfkme.run(
',[.,]', // source code string
[97, 98, 99], // input data
function(output){ // callback
console.log(output); // `output` is [97, 98, 99]
}
);
var Brainfuckme = require('brainfuckme');
var bfme = new Brainfuckme();
bfme.run()
.run(code, input, callback)
code
String which can contains +-,.<>[] code and commentsinput
Array of integers. Used as input (duh!)callback
A function that take two args, the array of integers and its String representation.
.resume(code, input, callback)
- same as .run()
.
inputToArray(string)
- converts string into array of integers.
.outputToString()
- returns the output stack as String. [110, 121, 97, 110, 99, 97, 116]
will return nyancat.
.value()
- return value of current pointed cell.
.reset()
- reset the object's state (cursor, output stack, input stack, pointer).
0.2.1
- Now available in two flavors, coffee and vanilla
- Various fixes