Merge pull request #49 from vaskevich/dev

Data file size reduction: strip quotes around keys
release
Etienne Lemay 2017-03-10 09:54:19 -05:00 committed by GitHub
commit 41c9a2ae52
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
})
})