Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.
pagename: this.state.pagename,
description: this.state.description,
prefix: this.state.prefix,
avatar: this.state.avatar,
cover: this.state.cover,
images: this.state.images,
link: this.state.link,
support: this.state.support,
custom_path: this.state.custom_path,
nsfw: this.state.nsfw === 'true' ? true : false,
};
if (this.state['github.owner']) {
data.github = {};
data.github.owner = this.state['github.owner'];
if (this.state['github.repo']) {
data.github.repo = this.state['github.repo'];
}
} else {
data.github = null;
}
const filedata = `---\n${dump(data, {
styles: {
'!!null': 'lowercase'
},
sortKeys: true
})}---\n${this.state.html || ''}`;
return {
data, filedata
};