0.2.1 • Published 3 years ago

bfts v0.2.1

Weekly downloads
-
License
MIT
Repository
-
Last release
3 years ago

bfts

CI npm version

Type-level Brainfuck interpreter.

Playground

Installation

Using npm:

$ npm install bfts

Using yarn:

$ yarn add bfts

Example

import type { Interpret } from "bfts";

type Result1 = Interpret<"++++[>+++++<-]>--.">;
// type Result1 = "\u0012"

type Result2 = Interpret<"+++++++++[>++++++++>+++++++++++>+++>+<<<<-]>.>++.+++++++..+++.>+++++.<<+++++++++++++++.>.+++.------.--------.>+.>+.">;
// type Result2 = "Hello World!\n"

// With input
type Result3 = Interpret<",+>,+>,+<<.>.>.", "ABC">;
// type Result3 = "BCD"

License

MIT