# brainfuckme

> Interpreter for Brainfuck language

Latest version **0.2.1** (published 2014-05-25) · MIT license · 0 weekly downloads

## Install

```sh
npm install brainfuckme
pnpm add brainfuckme
yarn add brainfuckme
bun add brainfuckme
```

## Health

**Score 15/100 (F)** — status: abandoned.

Positive: no vulnerabilities.

Warnings: low downloads; no types; no esm support; pre 1.0.

Negative: abandoned; low maintenance score.

## Facts

| | |
|---|---|
| Version | 0.2.1 |
| Published | 2014-05-25 |
| First published | 2013-08-04 |
| Weekly downloads | 0 |
| License | MIT |
| TypeScript types | none |
| Module format | CommonJS |
| Dependencies | 3 |
| Known vulnerabilities | 0 |
| Install scripts | no |
| GitHub stars | 1 |
| Author | Hendra G. |
| Maintainers | drabiter |
| Keywords | brainfuck, interpreter |

## Links

- npm: https://www.npmjs.com/package/brainfuckme
- Repository: https://github.com/drabiter/brainf-ckme
- Issues: https://github.com/drabiter/brainf-ckme/issues
- npm.io page: https://npm.io/package/brainfuckme

## Dependencies (3)

- [chai](https://npm.io/package/chai.md) ^1.9.1
- [mocha](https://npm.io/package/mocha.md) ^1.18.2
- [sinon](https://npm.io/package/sinon.md) ^1.9.1

## Recent versions

- 0.2.1 (latest) — 2014-05-25
- 0.2.0 — 2014-05-25
- 0.0.2 — 2013-08-04
- 0.0.1 — 2013-08-04

## README

Brainfuckme (brainf-ckme)
===========

[![NPM](https://nodei.co/npm/brainfuckme.png?downloads=true)](https://nodei.co/npm/brainfuckme/)

Write the f*cking Brainf*ck code and run the f*ck.
[Demo page](http://drabiter.com/brainf-ckme).

## Installation
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`

## Usage
*f*ck!*
#### Client
```javascript
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]
  }
);
```
#### Server
```javascript
var Brainfuckme = require('brainfuckme');
```

## API
`.run(code, input, callback)`
- `code` String which can contains +-,.<>[] code and comments
- `input` 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).

## Changelog

**0.2.0**
- Now available in two flavors, coffee and vanilla
- Various fixes

---
_Source: https://npm.io/package/brainfuckme · Machine-readable twin of the npm.io package page. Health data is recomputed on every publish._
