Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.
function getGtk(version = '3.0') {
const Gtk = nodeGtk.require('Gtk', version);
if (!initialized) {
initialized = true;
nodeGtk.startLoop();
Gtk.init();
}
return Gtk;
}