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