1.0.1 • Published 2 years ago

encoder-plantuml v1.0.1

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

encoder-plantuml

PlantUML encoder in Node.js.

Install

Node.js:

npm install encoder-plantuml

Example

const plantumlEncoder = require('encoder-plantuml');

const decodedData = 
`@startuml
Bob -> Alice : hello
@enduml`;

const encodedData = plantumlEncoder.encode(decodedData);
console.log(encodedData) // SoWkIImgAStDuNBAJrBGjLDmpCbCJbMmKiX8pSd9vt98pKi1IW80
const url = 'http://www.plantuml.com/plantuml/img/' + encodedData;

// ![image](https://www.plantuml.com/plantuml/img/SoWkIImgAStDuNBAJrBGjLDmpCbCJbMmKiX8pSd9vt98pKi1IW80)

The URL can then be used to display the diagram:

image

License

MIT