google-supported-domains is a Node (JavaScript) module exports all Google supported domains (.google.*
), and provides an API to test if any domain is a Google domain.
$ npm install google-supported-domains
import domains from "google-supported-domains";
// Get all Google supported domains as a string array.
domains.all();
// => ['.google.ad', '.google.ae', '.google.al', ...]
// Test if any domain is a Google domain.
domains.test("www.google.com"); // => true
domains.test("www.google.co.jp"); // => true
domains.test("mail.google.com"); // => true
domains.test("www.example.com"); // => false
domains.test("foo.example.net"); // => false
Licensed under the MIT License.