Tld package provides functionality to generate a fake tld (top-level domain) value.
npm
npm install @fakerjs/tld --save-dev
yarn
yarn add @fakerjs/tld -D
import tld from '@fakerjs/tld';
tld();
//=> com
Run tests
npm run test
The MIT License (MIT) Copyright (c) Sergey Romanenko