Skip to content

Commit

Permalink
Strip quotes around keys
Browse files Browse the repository at this point in the history
  • Loading branch information
oleg-codaio committed Mar 2, 2017
1 parent 87ab03e commit 0bfd3b3
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion scripts/build-data.js
Expand Up @@ -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
})
})

0 comments on commit 0bfd3b3

Please sign in to comment.