A Deno library for encoding and decoding PlantUML code.
deno add @mogeko/plantuml-encoding
For Node.js users:
npx jsr add @mogeko/plantuml-encoding
import { encode } from "jsr:@mogeko/plantuml-encoding";
const encoded = encode("A -> B: Hello");
console.log(encoded); // SrJGjLDmibBmICt9oGS0
const url = `https://www.plantuml.com/plantuml/svg/${encoded}`;
Visit the URL and you will get this flowchart:
import { decode } from "jsr:@mogeko/plantuml-encoding";
const puml = decode("SrJGjLDmibBmICt9oGS0");
console.log(puml); // A -> B: Hello
The code in this project is released under the MIT License.