0.2.1 • Published 3 years ago
bfts v0.2.1
bfts
Type-level Brainfuck interpreter.
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