Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.
.then(res => {
if (res) {
const tokens = Object.keys(res);
const content = printFlowDefinition(
tokens,
this.eol || getLineSeparator(tokens[0])
);
resolve(content);
} else {
reject(res);
}
})
.catch(err => reject(err));