{"size": 406, "ext": "js", "max_stars_repo_path": "src/utils/sortList.js", "max_stars_repo_name": "bryan667/filipino-badwords-list", "max_stars_repo_stars_event_min_datetime": "2018-10-17T05:04:54.000Z", "max_stars_repo_stars_event_max_datetime": "2022-01-09T11:02:42.000Z", "max_issues_repo_path": "src/utils/sortList.js", "max_issues_repo_name": "bryan667/filipino-badwords-list", "max_issues_repo_issues_event_min_datetime": "2018-10-15T07:20:13.000Z", "max_issues_repo_issues_event_max_datetime": "2018-10-24T00:41:53.000Z", "max_forks_repo_path": "src/utils/sortList.js", "max_forks_repo_name": "bryan667/filipino-badwords-list", "max_forks_repo_forks_event_min_datetime": "2018-10-15T07:34:40.000Z", "max_forks_repo_forks_event_max_datetime": "2022-01-09T11:02:46.000Z"}
{"max_stars_count": 15, "max_issues_count": 8, "max_forks_count": 14, "avg_line_length": 27.0666666667, "max_line_length": 71, "alphanum_fraction": 0.6477832512}
const fs = require("fs");
const badwords = require("../filipino-badwords-list");

const list = badwords.sort().map(badword => {
  return badword.toLowerCase();
});

const filename = "src/filipino-badwords-list.js";
const content = 'module.exports = [\n"' + list.join('",\n"') + '"\n];';

fs.writeFile(filename, content, err => {
  if (err) throw err;
  console.log(`Success writing ${filename} file`);
});
