Sha256: 1e4a939dab44315b7ba5d27f120ab6c7215807eefc65e30bfd5957d9935836db
Contents?: true
Size: 351 Bytes
Versions: 4
Compression:
Stored size: 351 Bytes
Contents
#!/usr/bin/env ruby # frozen_string_literal: true require "open-uri" require "json" tlds = URI.open("https://data.iana.org/TLD/tlds-alpha-by-domain.txt").read.lines tlds.shift # remove update notice tlds.map!(&:downcase) tlds.map!(&:strip) tlds.sort! tlds.uniq! File.open("./data/tld.json", "w") do |file| file << JSON.pretty_generate(tlds) end
Version data entries
4 entries across 4 versions & 1 rubygems
Version | Path |
---|---|
validators-3.1.1 | bin/sync-tld |
validators-3.1.0 | bin/sync-tld |
validators-3.0.5 | bin/sync-tld |
validators-3.0.4 | bin/sync-tld |