Commit ffcae14a authored by Aral Balkan's avatar Aral Balkan

Add script to convert top domains CSV to JSON

parent 35b8d0b5
Pipeline #906 failed with stages
// Take the top 5000 CSV and convert it to JSON (and save it as domains.json)
const fs = require('fs')
const commaSeparated = fs.readFileSync('alexa-top-5000.csv', 'utf-8')
const commaSeparatedList = commaSeparated.split('\n')
const domainList = commaSeparatedList.map(domain => domain.replace(/.*?,/,''))
const json = JSON.stringify(domainList)
fs.writeFileSync('domains.json', json)
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment