brainfuck-compiler

1.0.6 • Public • Published

Brainfuck

Very simple Brainfuck compilator to JavaScript

npm install

Require bf

var bf = require('./brainfuck.js');

Configure compilator

bf.config({memorySize: 256, bits: 16});

Compile Brainfuck code

var compiled = bf.compile('++++++++++[>+++++++>++++++++++>+++>+<<<<-]>++.>+.+++++++..+++.>++.<<+++++++++++++++.>.+++.------.--------.>+.>.');

Run code with empty input

var buf = [];
compiled.run('', function (num, char) {
  buf.push(char);
});
console.log(buf.join(''));

Show compiled code

console.log(compiled + '');

Versions

Current Tags

VersionDownloads (Last 7 Days)Tag
1.0.62latest

Version History

VersionDownloads (Last 7 Days)Published
1.0.62
1.0.50
1.0.40
1.0.30
1.0.21
1.0.10
1.0.00
0.0.31
0.0.20
0.0.10

Package Sidebar

Install

npm i brainfuck-compiler

Weekly Downloads

4

Version

1.0.6

License

MIT

Last publish

Collaborators

  • gkucmierz