This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
const matches = data.content.tableData.events[0].matches | |
const mapMatch = (match) => { | |
const title = match.competitors.map(team => team.name).join('-') | |
return { | |
title: title, | |
start: new Date(match.startDate).toLocaleString(), | |
} | |
} |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// node ./rename-js-to-jsx.js ./my/folder | |
const fs = require('fs') | |
const path = require('path') | |
// Options | |
const src = process.argv[2] ?? './' | |
const pattern = process.argv[3] ? new RegExp(`${process.argv[3]}$`) : /.js$/ | |
const newExtension = process.argv[4] ?? '.jsx' |