()
| 1 | import { animals, names, uniqueNamesGenerator } from 'unique-names-generator'; |
| 2 | |
| 3 | export function randomName() { |
| 4 | return uniqueNamesGenerator({ |
| 5 | dictionaries: [names, animals], |
| 6 | length: 2, |
| 7 | style: 'capital', |
| 8 | separator: ' ', |
| 9 | }); |
| 10 | } |
| 11 | |
| 12 | export function randomSplitName() { |
| 13 | const [firstName, lastName] = randomName().split(' '); |