MCPcopy Index your code
hub / github.com/microsoft/SandDance / embedScript

Function embedScript

docs/app/js/sanddance-app.js:11770–11778  ·  view source on GitHub ↗
(csv, displayName, snapshots)

Source from the content-addressed store, hash-verified

11768 return value === null ? "" : value;
11769}
11770function embedScript(csv, displayName, snapshots) {
11771 const dataFile = {
11772 type: "csv",
11773 displayName,
11774 snapshots
11775 };
11776 return `<pre id='csv-data' style='display:none'>${csv}</pre>
11777 <script>SandDanceEmbed.load(Object.assign({rawText: document.getElementById('csv-data').innerText}, ${JSON.stringify(dataFile)}))</script>`;
11778}
11779function getEmbedHTML(data, displayName, snapshots) {
11780 const json = JSON.stringify(data, columnReplacer);
11781 const csv = (0, _exportDelimited.convertToDelimited)(JSON.parse(json), ",");

Callers 2

createExportMethod · 0.70
getEmbedHTMLFunction · 0.70

Calls

no outgoing calls

Tested by

no test coverage detected