mirror of
https://github.com/mermaid-js/mermaid.git
synced 2025-09-04 16:16:41 +02:00
14 lines
308 B
JavaScript
14 lines
308 B
JavaScript
import { Base64 } from 'js-base64'
|
|
|
|
const mermaidUrl = (graphStr, options) => {
|
|
const obj = {
|
|
code: graphStr,
|
|
mermaid: options
|
|
}
|
|
const objStr = JSON.stringify(obj)
|
|
// console.log(Base64)
|
|
return 'http://localhost:9000/e2e.html?graph=' + Base64.encodeURI(objStr)
|
|
}
|
|
|
|
export default mermaidUrl
|