bf-compiler
v1.0.2
Published
**Compiler** [Brainfuck](https://en.wikipedia.org/wiki/Brainfuck) to Javascript
Downloads
1
Readme
brainfuck-compiler
Compiler Brainfuck to Javascript
Install
npm install bf-compiler
Command line
bf-compile -i source.txt -o result.js
// or pass source code directly
br-compile -s '++--..><[]' -o result.js
```r
## Javascript API
```javascript
import { compiler } from 'bf-compiler';
// using `require` in node.js
const result = compiler(source);
// pure compile result
result.compiler;
// compile result and preset function
result.code;
// Brainfuck tokens
result.tokens;
// Brainfuck ast
result.ast;
// Javascript ast
result.javascriptAst;