Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.
.forEach((file) => {
console.log(`Removing types from "${file}`);
const input = fs.readFileSync(file, 'utf8');
const withoutFlow = flowRemoveTypes(input).toString();
const cleanedUp = withoutFlow
// Remove the empty flow tags.
.replace(/\/\*\s+\*\/\n/g, '')
// Remove any blank lines at top of file.
.replace(/^\n+/, '')
// Remove any multiple blank lines in files.
.replace(/\n\n+/g, '\n\n');
fs.writeFileSync(file, cleanedUp);
});
.forEach((file) => {
console.log(`Removing types from "${file}`);
const input = fs.readFileSync(file, 'utf8');
const withoutFlow = flowRemoveTypes(input).toString();
const cleanedUp = withoutFlow
// Remove the empty flow tags.
.replace(/\/\*\s+\*\/\n/g, '')
// Remove any blank lines at top of file.
.replace(/^\n+/, '')
// Remove any multiple blank lines in files.
.replace(/\n\n+/g, '\n\n');
fs.writeFileSync(file, cleanedUp);
});