You cannot select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

12 lines
284 B
JavaScript

import fs from 'fs'
import { download } from 'libphonenumber-metadata-generator'
const url = process.argv[2]
const outputPath = process.argv[3]
download(url).then((contents) => {
fs.writeFileSync(outputPath, contents)
}).catch((error) => {
console.error(error)
process.exit(1)
})