# bfcomp

> Compile and convert text to brainfuck code

Latest version **1.0.0** (published 2023-05-13) · MIT license · 0 weekly downloads

## Install

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

## Health

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

Positive: esm support; no vulnerabilities.

Warnings: low downloads; no types.

Negative: abandoned; low maintenance score.

## Facts

| | |
|---|---|
| Version | 1.0.0 |
| Published | 2023-05-13 |
| First published | 2023-05-13 |
| Weekly downloads | 0 |
| License | MIT |
| TypeScript types | none |
| Module format | ESM + CommonJS |
| Dependencies | 0 |
| Unpacked size | 3 KB |
| Known vulnerabilities | 0 |
| Install scripts | no |
| Author | Axorax |
| Maintainers | axoraxdev |
| Keywords | brainfuck, bf-compiler, texttobf |

## Links

- npm: https://www.npmjs.com/package/bfcomp
- Repository: https://github.com/Axorax/bfcomp.js
- Homepage: https://github.com/Axorax/bfcomp.js#readme
- Issues: https://github.com/Axorax/bfcomp.js/issues
- npm.io page: https://npm.io/package/bfcomp

## Alternatives

- [@openai/codex-sdk](https://npm.io/package/@openai/codex-sdk.md) — 731.4K weekly downloads
- [babel-plugin-transform-react-jsx](https://npm.io/package/babel-plugin-transform-react-jsx.md) — 565.0K weekly downloads
- [babel-helper-remove-or-void](https://npm.io/package/babel-helper-remove-or-void.md) — 508.5K weekly downloads
- [@pnpm/store-controller-types](https://npm.io/package/@pnpm/store-controller-types.md) — 186.9K weekly downloads
- [react-native-signature-canvas](https://npm.io/package/react-native-signature-canvas.md) — 155.6K weekly downloads

## Recent versions

- 1.0.0 (latest) — 2023-05-13

## README

<h1 align="center"><code>bfcomp.js</code></h1>

<p align="center">Compile and convert text to brainfuck code</p>

## ⚙️ Installation

```js
npm i bfcomp
```

**CDN Links:**
- https://cdn.jsdelivr.net/npm/bfcomp@1.0.0/bfcomp.js
- https://www.unpkg.com/bfcomp@1.0.0/bfcomp.js

## 📖 Usage

#### ◎ Import

```js
// ES6
import bfcomp from "bfcomp";

// commonjs
const bfcomp = require("bfcomp");
```

#### ◎ Compile / To text

```js
const code = "++++++++[>++++[>++>+++>+++>+<<<<-]>+>+>->>+[<]<-]>>.>---.+++++++..+++.>>.<-.<.+++.------.--------.>>+.>++.";

const text = bfcomp.compile(code);
const text2 = bfcomp.toText(code);

console.log(text); // "Hello World!"
console.log(text2); // "Hello World!"
```

#### ◎ Run

```js
// code variable declared in the previous example
bfcomp.run(code);
```

This will `console.log()` the compiled BF code.

#### ◎ To code

```js
const code = bfcomp.toCode("Hello!");

console.log(code); // returns BF code
```

```js
const code = bfcomp.toCode("Hello!");

bfcomp.run(code);
```

---

[Support me on Patreon](https://www.patreon.com/axorax) - 
[Check out my socials](https://github.com/axorax/socials)

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