tio.js
v4.0.3
Published
A small TypeScript library that lets you evaluate code in a sandboxed environment everywhere with TryItOnline.
Maintainers
Readme
tio.js

A small TypeScript library that lets you evaluate code in a sandboxed environment everywhere with TryItOnline.
Supported languages
Before getting to the examples, please note that tio.js supports a wide variety of programming languages. These programming languages contain their own IDs that can be used in customizing the programming language to use.
For example javascript-node is for running JavaScript in a Node.js runtime, python3 is for running in a Python 3 environment, etc.
In code, these can be retrieved programmatically by using:
console.log(tio.languages)
// => ['05ab1e', '1l-a', '1l-aoi', '2dfuck', ...]Therefore, here are the full list of supported programming languages alongside with their IDs in alphabetical order for your convenience.
| Name | ID |
| --------------------------------------------------------------------------------------------------------------- | ------------------------- |
| ABC | abc |
| ABC-assembler | abc-assembler |
| Ada (GNAT) | ada-gnat |
| Agda | agda |
| ALGOL 68 (Genie) | algol68g |
| Alice ML | aliceml |
| APL (Dyalog Unicode) | apl-dyalog |
| APL (Dyalog Classic) | apl-dyalog-classic |
| APL (Dyalog Extended) | apl-dyalog-extended |
| APL (dzaima/APL) | apl-dzaima |
| APL (ngn/apl) | apl-ngn |
| Appleseed | appleseed |
| ASPeRiX | asperix |
| Assembly (as, x64, Linux) | assembly-as |
| Assembly (fasm, x64, Linux) | assembly-fasm |
| Assembly (gcc, x64, Linux) | assembly-gcc |
| Assembly (JWasm, x64, Linux) | assembly-jwasm |
| Assembly (nasm, x64, Linux) | assembly-nasm |
| ATS2 | ats2 |
| Attache | attache |
| AWK | awk |
| Bash | bash |
| bc | bc |
| BeanShell | beanshell |
| Boo | boo |
| bosh | bosh |
| Bracmat | bracmat |
| Brat | brat |
| C (clang) | c-clang |
| C (gcc) | c-gcc |
| C (tcc) | c-tcc |
| Caboose | caboose |
| CakeML | cakeml |
| calc (TTK) | calc2 |
| Ceylon | ceylon |
| Charm | charm |
| Chapel | chapel |
| Checked C | checkedc |
| Cheddar | cheddar |
| CIL (Mono IL assembler) | cil-mono |
| cixl | cixl |
| Clean | clean |
| CLIPS | clips |
| Common Lisp | clisp |
| Clojure | clojure |
| COBOL (GNU) | cobol-gnu |
| Cobra | cobra |
| Coconut | coconut |
| CoffeeScript 1 | coffeescript |
| CoffeeScript 2 | coffeescript2 |
| C++ (clang) | cpp-clang |
| C++ (gcc) | cpp-gcc |
| CPY | cpy |
| Cryptol | cryptol |
| Crystal | crystal |
| C# (.NET Core) | cs-core |
| C# (Visual C# Compiler) | cs-csc |
| C# (Visual C# Interactive Compiler) | cs-csi |
| C# (Mono C# compiler) | cs-mono |
| C# (Mono C# Shell) | cs-mono-shell |
| Curry (PAKCS) | curry-pakcs |
| Curry (Sloth) | curry-sloth |
| Cyclone | cyclone |
| D | d |
| Dafny | dafny |
| Dart | dart |
| Dash | dash |
| dc | dc |
| dg | dg |
| DScript | dscript |
| eC | ec |
| ecpp + C (gcc) | ecpp-c |
| ecpp + C++ (gcc) | ecpp-cpp |
| Dyvil | dyvil |
| ed | ed |
| Egel | egel |
| ELF (x86/x64, Linux) | elf |
| Elixir | elixir |
| Emacs Lisp | emacs-lisp |
| Erlang (escript) | erlang-escript |
| es | es |
| Euphoria 3 | euphoria3 |
| Euphoria 4 | euphoria4 |
| Factor | factor |
| Fantom | fantom |
| Farnsworth | farnsworth |
| Felix | felix |
| fish | fish-shell |
| FOCAL-69 | focal |
| Forth (gforth) | forth-gforth |
| Fortran (GFortran) | fortran-gfortran |
| F# (.NET Core) | fs-core |
| F# (Mono) | fs-mono |
| Funky | funky |
| Funky 2 | funky2 |
| GAP | gap |
| Gema | gema |
| gnuplot | gnuplot |
| Go | go |
| Granule | granule |
| Groovy | groovy |
| Gwion | gwion |
| HadesLang | hades |
| Haskell | haskell |
| Haskell 1.2 (Gofer) | haskell-gofer |
| Haskell 98 (Hugs) | haskell-hugs |
| Literate Haskell | haskell-literate |
| Haxe | haxe |
| Hobbes | hobbes |
| Huginn | huginn |
| Hy | hy |
| Icon | icon |
| Idris | idris |
| ink | ink |
| Io | io |
| J | j |
| jq | jq |
| Jx | jx |
| Java (JDK) | java-jdk |
| Java (OpenJDK 8) | java-openjdk |
| JavaScript (Babel Node) | javascript-babel-node |
| JavaScript (Node.js) | javascript-node |
| JavaScript (SpiderMonkey) | javascript-spidermonkey |
| JavaScript (V8) | javascript-v8 |
| Joy | joy |
| Julia 0.4 | julia |
| Julia 1.0 | julia1x |
| Julia 0.5 | julia5 |
| Julia 0.6 | julia6 |
| Julia 0.7 | julia7 |
| K (Kona) | k-kona |
| K (ngn/k) | k-ngn |
| K (oK) | k-ok |
| Kobeři-C | koberi-c |
| Koka | koka |
| Kotlin | kotlin |
| ksh | ksh |
| Lean | lean |
| Lily | lily |
| LLVM IR | llvm |
| Lua | lua |
| Lua (LuaJIT) | lua-luajit |
| Lua (OpenResty) | lua-openresty |
| M4 | m4 |
| Make | make |
| Mamba | mamba |
| Wolfram Language (Mathematica) | mathematica |
| Mathics | mathics |
| Maxima | maxima |
| Moonscript | moonscript |
| Mouse-79 | mouse |
| Mouse-2002 | mouse2002 |
| Mouse-83 | mouse83 |
| MUMPS | mumps |
| MY-BASIC | my-basic |
| Nial | nial |
| Nim | nim |
| Oberon-07 | oberon-07 |
| Object Pascal (FPC) | object-pascal-fpc |
| Objective-C (clang) | objective-c-clang |
| Objective-C (gcc) | objective-c-gcc |
| occam-pi | occam-pi |
| OCaml | ocaml |
| Octave | octave |
| Odin | odin |
| OSH | osh |
| Pari/GP | pari-gp |
| Pascal (FPC) | pascal-fpc |
| Perl 4 | perl4 |
| Perl 5 | perl5 |
| Perl 5 (cperl) | perl5-cperl |
| Perl 6 | perl6 |
| Perl 6 (Niecza) | perl6-niecza |
| Phoenix | phoenix |
| PHP | php |
| Physica | physica |
| PicoLisp | picolisp |
| Pike | pike |
| PILOT (psPILOT) | pilot-pspilot |
| PILOT (RPilot) | pilot-rpilot |
| Pony | pony |
| Positron | positron |
| PostScript (xpost) | postscript-xpost |
| PowerShell | powershell |
| PowerShell Core | powershell-core |
| Prolog (Ciao) | prolog-ciao |
| Prolog (SWI) | prolog-swi |
| Proton | proton |
| Proton 2.0 | proton2 |
| P# | ps-core |
| Pure | pure |
| PureScript | purescript |
| Python 1 | python1 |
| Python 2 | python2 |
| Python 2 (Cython) | python2-cython |
| Python 2 (IronPython) | python2-iron |
| Python 2 (Jython) | python2-jython |
| Python 2 (PyPy) | python2-pypy |
| Python 3 | python3 |
| Python 3.8 (pre-release) | python38pr |
| Python 3 (Cython) | python3-cython |
| Python 3 (PyPy) | python3-pypy |
| Python 3 (Stackless) | python3-stackless |
| Q# | qs-core |
| R | r |
| Racket | racket |
| RAD | rad |
| Rapira | rapira |
| Reason | reason |
| REBOL | rebol |
| REBOL 3 | rebol3 |
| Red | red |
| Rexx (Regina) | rexx |
| Ring | ring |
| rk | rk |
| Röda | roda |
| Ruby | ruby |
| Rust | rust |
| Scala | scala |
| Chez Scheme | scheme-chez |
| CHICKEN Scheme | scheme-chicken |
| Gambit Scheme (gsi) | scheme-gambit |
| Guile | scheme-guile |
| sed 4.2.2 | sed |
| sed | sed-gnu |
| sfk | sfk |
| Shnap | shnap |
| Sidef | sidef |
| Simula (cim) | simula |
| SISAL | sisal |
| Standard ML (MLton) | sml-mlton |
| SNOBOL4 (CSNOBOL4) | snobol4 |
| Assembly (MIPS, SPIM) | spim |
| SQLite | sqlite |
| Squirrel | squirrel |
| Stacked | stacked |
| Swift | swift4 |
| Tcl | tcl |
| tcsh | tcsh |
| TemplAt | templat |
| TypeScript | typescript |
| uBASIC | ubasic |
| Ursala | ursala |
| Vala | vala |
| Visual Basic .NET (.NET Core) | vb-core |
| Visual Basic .NET (Mono) | visual-basic-net-mono |
| Visual Basic .NET (VBC) | visual-basic-net-vbc |
| V (vlang.io) | vlang |
| VSL | vsl |
| WebAssembly (WaWrapper) | wasm |
| Wren | wren |
| Yabasic | yabasic |
| yash | yash |
| B (ybc) | ybc |
| Z3 | z3 |
| Zephyr | zephyr |
| Zig | zig |
| zkl | zkl |
| Zoidberg | zoidberg |
| Zsh | zsh |
| Name | ID |
| ---------------------------------------------------------------------------------------------------------------------------------- | --------------------------- |
| 4 | 4 |
| 7 | 7 |
| 33 | 33 |
| 99 | 99 |
| 05AB1E (legacy) | 05ab1e |
| 1L_a | 1l-a |
| 1L_AOI | 1l-aoi |
| 2DFuck | 2dfuck |
| 2L | 2l |
| 2sable | 2sable |
| 3var | 3var |
| a-gram | a-gram |
| A Pear Tree | a-pear-tree |
| Acc!! | accbb |
| Aceto | aceto |
| Actually | actually |
| Adapt | adapt |
| Add++ | addpp |
| ADJUST | adjust |
| Agony | agony |
| Ahead | ahead |
| Aheui (esotope) | aheui |
| Alchemist | alchemist |
| Alice | alice |
| Alice & Bob | alice-bob |
| AlphaBeta | alphabeta |
| Alphabetti spaghetti | alphabetti-spaghetti |
| Alphuck | alphuck |
| Alumin | alumin |
| The Amnesiac From Minsk | amnesiac-from-minsk |
| Ante | ante |
| anyfix | anyfix |
| ARBLE | arble |
| Archway | archway |
| Archway2 | archway2 |
| Arcyóu | arcyou |
| ArnoldC | arnoldc |
| AsciiDots | asciidots |
| Aubergine | aubergine |
| axo | axo |
| Backhand | backhand |
| Bitwise Cyclic Tag But Way Worse | bctbww |
| Bitwise Cyclic Tag But Way Worse 2.0 | bctbww2 |
| Beam | beam |
| Bean | bean |
| Beatnik | beatnik |
| Beeswax | beeswax |
| Befunge-93 | befunge |
| Befunge-93 (FBBI) | befunge-93-fbbi |
| Befunge-93 (MTFI) | befunge-93-mtfi |
| Befunge-93 (PyFunge) | befunge-93-pyfunge |
| Befunge-96 (MTFI) | befunge-96-mtfi |
| Befunge-97 (MTFI) | befunge-97-mtfi |
| Befunge-98 (FBBI) | befunge-98 |
| Befunge-98 (PyFunge) | befunge-98-pyfunge |
| Bit | bit |
| BitBitJump | bitbitjump |
| bitch | bitch |
| bitch (bit-h) | bitch-bith |
| bitch (shifty) | bitch-shifty |
| BitChanger | bitchanger |
| BitCycle | bitcycle |
| Bitwise | bitwise |
| Black (blak) | blak |
| Binary Lambda Calculus | blc |
| Boolfuck | boolfuck |
| Bot Engine | bot-engine |
| Brachylog v1 | brachylog |
| Brachylog | brachylog2 |
| Braille | braille |
| Brain-Flak | brain-flak |
| Brainbash | brainbash |
| brainbool | brainbool |
| BrainFlump | brainflump |
| brainfuck | brainfuck |
| Braingolf | braingolf |
| Brain-Flak (BrainHack) | brainhack |
| Brainlove | brainlove |
| BrainSpace | brainspace |
| Brian & Chuck | brian-chuck |
| Broccoli | broccoli |
| Bubblegum | bubblegum |
| Burlesque | burlesque |
| BuzzFizz | buzzfizz |
| Bitwise Fuckery | bwfuckery |
| Canvas | canvas |
| Cardinal | cardinal |
| Carol & Dave | carol-dave |
| Carrot | carrot |
| Cascade | cascade |
| Catholicon | catholicon |
| Cauliflower | cauliflower |
| Ceres | ceres |
| Chain | chain |
| Chef | chef |
| Changeling | changeling |
| Charcoal | charcoal |
| Check | check |
| Chip | chip |
| Cinnamon Gum | cinnamon-gum |
| CJam | cjam |
| Clam | clam |
| ,,, | commata |
| Commentator | commentator |
| Commercial | commercial |
| Condit | condit |
| Convex | convex |
| Cood | cood |
| Corea | corea |
| COW | cow |
| cQuents | cquents |
| Crayon | crayon |
| CSL | csl |
| Cubically | cubically |
| Cubix | cubix |
| Curlyfrick | curlyfrick |
| Cy | cy |
| D2 | d2 |
| Deadfish~ | deadfish- |
| Decimal | decimal |
| Del|m|t | delimit |
| Deorst | deorst |
| Dirty | dirty |
| Detour | detour |
| DOBELA | dobela |
| DOBELA (dobcon) | dobela-dobcon |
| Dodos | dodos |
| Dreaderef | dreaderef |
| Drive-In Window | drive-in-window |
| DStack | dstack |
| eacal | eacal |
| !@#$%^&*()_+ | ecndpcaalrlp |
| Element | element |
| ELVM-IR | elvm-ir |
| Emmental | emmental |
| Emoji | emoji |
| Emoji-gramming | emoji-gramming |
| Emojicode 0.5 | emojicode |
| Emojicode | emojicode6 |
| EmojiCoder | emojicoder |
| emotifuck | emotifuck |
| Emotinomicon | emotinomicon |
| (()) | empty-nest |
| Enlist | enlist |
| ESOPUNK | esopunk |
| ETA | eta |
| evil | evil |
| Explode | explode |
| Extended Brainfuck Type I | extended-brainfuck-type-i |
| ExtraC | extrac |
| face | face |
| FALSE | false |
| FerNANDo | fernando |
| FEU | feu |
| FIM++ | fimpp |
| ><> | fish |
| Fission | `f
