Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.
return c.process((input, output) => {
if (!input.hasData('name')) { return; }
const data = input.getData('name');
const value = !noflo.isBrowser() ? global[data] : window[data];
if (typeof value === 'undefined') {
const err = new Error(`"${data}" is undefined on the global object.`);
output.sendDone(err);
return;
}
output.sendDone({ value });
});
};