var fs = require('fs'); var JSDOM = require('jsdom').JSDOM; var window = new JSDOM('', { runScripts: 'dangerously' }).window; // Mock things that jsdom doesn't support out-of-the-box window.URL.createObjectURL = function() {}; module.exports = function plotlyNode(plotlyPath) { // Execute source code by inserting a