1.5.1 • Published 2 years ago

@anb0s/plantuml-encoder v1.5.1

Weekly downloads
1
License
MIT
Repository
github
Last release
2 years ago

plantuml-encoder

PlantUML encoder for browsers and Node.js.

npm Version build-status js-standard-style

Encoded PlantUML can be used to create PlantUML URL links. It resolves PlantUML 'include' statements before encoding.

Install

Node.js:

npm install @anb0s/plantuml-encoder

browser:

bower install @anb0s/plantuml-encoder

Example

var plantumlEncoder = require('@anb0s/plantuml-encoder')

var encoded = plantumlEncoder.encode('A -> B: Hello')
console.log(encoded) // SrJGjLDmibBmICt9oGS0

var url = 'http://www.plantuml.com/plantuml/img/' + encoded

The URL can then be used to display the diagram:

alt tag

Decode example

var plantumlEncoder = require('@anb0s/plantuml-encoder')

var plain = plantumlEncoder.decode('SrJGjLDmibBmICt9oGS0')
console.log(plain) // A -> B: Hello

License

MIT

1.5.1

2 years ago

1.5.0

2 years ago