A minimal JavaScript client for generating PlantUML diagram URLs via the PlantUML web service. Current version 0.0.1 provides a single function geturl() that compresses PlantUML source text and returns a URL pointing to an image (PNG, SVG, ASCII art) hosted on plantuml.com. The library has dependencies on johan/js-deflate and plantuml-encoder for encoding. It is a very early package with limited documentation and no TypeScript types, suitable for quick prototyping but not production-grade.
npm install plantuml-apiNo compatibility data collected yet for this library.
Verified import paths — ran on the pinned version, not inferred.
Shows how to require the geturl function, generate an SVG URL for a simple diagram, and generate a PNG URL with full PlantUML syntax.
Manually install dependencies: npm install johan/js-deflate plantuml-encoder
Use fetch() or axios to retrieve the image after obtaining the URL.
Add a // @ts-ignore or create a .d.ts file: declare module 'plantuml-api';
npm install johan/js-deflate
Use const { geturl } = require('plantuml-api'); instead of import { geturl } from 'plantuml-api';