Strip quotes around keys

nolan/hinaloe-test
Oleg Vaskevich 2017-03-02 10:55:01 -08:00
parent 87ab03e6bd
commit 0bfd3b3e52
1 changed files with 2 additions and 1 deletions

View File

@ -103,7 +103,8 @@ flags.emojis.sort()
mkdirp('data', (err) => {
if (err) throw err
fs.writeFile('data/index.js', `export default ${JSON.stringify(data)}`, (err) => {
const stringifiedData = JSON.stringify(data).replace(/\"([A-Za-z_]+)\":/g, '$1:')
fs.writeFile('data/index.js', `export default ${stringifiedData}`, (err) => {
if (err) throw err
})
})