theBrain
raw JSON → 1.0.13 verified Fri May 01 auth: no javascript
theBrain is a brainf**k transpiler that converts brainf**k code into JavaScript (specifically Node.js). It reads a .bf file and outputs an equivalent JavaScript file. Version 1.0.13 is the latest and only stable version. The package is minimal with no active development. Differentiator: simple CLI tool for brainf**k to JS transpilation.
Common errors
error Error: Cannot find module 'thebrain' ↓
cause Package not installed globally or locally.
fix
Install with npm install -g thebrain or npx thebrain
Warnings
gotcha The CLI expects arguments in --key=value format, not positional arguments. ↓
fix Use --input and --output flags explicitly.
Install
npm install thebrain yarn add thebrain pnpm add thebrain Imports
- transpile wrong
const transpile = require('thebrain').transpilecorrectimport { transpile } from 'thebrain'
Quickstart
echo "++++++++[>++++[>++>+++>+++>+<<<<-]>+>+>->>+[<]<-]>>.>---.+++++++..+++.>>.<-.<.+++.------.--------.>>+.>++." > helloworld.bf
npx thebrain --input=helloworld.bf --output=hello.js
node hello.js