Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/maxhallinan/brunfaick
A Brainfuck interpeter implemented in JavaScript.
https://github.com/maxhallinan/brunfaick
brainfuck esolang
Last synced: about 1 month ago
JSON representation
A Brainfuck interpeter implemented in JavaScript.
- Host: GitHub
- URL: https://github.com/maxhallinan/brunfaick
- Owner: maxhallinan
- License: mit
- Created: 2017-03-25T20:46:22.000Z (over 7 years ago)
- Default Branch: master
- Last Pushed: 2021-08-11T04:04:21.000Z (over 3 years ago)
- Last Synced: 2024-11-13T06:53:59.989Z (about 1 month ago)
- Topics: brainfuck, esolang
- Language: JavaScript
- Homepage:
- Size: 196 KB
- Stars: 7
- Watchers: 3
- Forks: 1
- Open Issues: 4
-
Metadata Files:
- Readme: readme.md
- License: license
Awesome Lists containing this project
README
# brunfaick
A [Brainfuck](https://en.wikipedia.org/wiki/Brainfuck) interpreter implemented
in JavaScript.## Install
```
$ npm install --save brunfaick
```## Usage
```js
const brunfaick = require('brunfaick');brunfaick('++++++++++[>+++++++>++++++++++>+++>+<<<<-]>++.>+.+++++++..+++.>++.<<+++++++++++++++.>.+++.------.--------.>+.>.');
//=> 'Hello World!'
```## API
### brunfaick(program, input)
#### program
Type: `string`
A string of Brainfuck commands.
#### input
Type: `string`
Default: `undefined`Input provided to `program` during execution.
## CLI
```
$ npm install --global brunfaick
``````
$ brunfaick --help
Usage
$ brunfaick [program]Options
-f, --file
Path to a Brainfuck file.-i, --input
Input provided to [program] during execution.Examples
$ brunfaick '++++++++++[>+++++++>++++++++++>+++>+<<<<-]>++.>+.+++++++..+++.>++.<<+++++++++++++++.>.+++.------.--------.>+.>.'
Hello World!$ brunfaick --file=hello-world.b
Hello World!$ brunfaick --file=wc.b --input='foo bar baz'
0 3 11
```## License
MIT © [Max Hallinan](https://github.com/maxhallinan)