refactor: turn random word list source from json to ts

This prevents future import issues

Signed-off-by: Tilman Vatteroth <git@tilmanvatteroth.de>
This commit is contained in:
Tilman Vatteroth 2023-05-24 23:15:37 +02:00
parent e5911b09c1
commit d1ce1cb3e4
3 changed files with 1337 additions and 1332 deletions

View file

@ -3,7 +3,7 @@
*
* SPDX-License-Identifier: AGPL-3.0-only
*/
import lists from './random-words.json';
import { adjectives, items } from './random-words';
/**
* Generates a random names based on an adjective and a noun.
@ -11,8 +11,8 @@ import lists from './random-words.json';
* @return the generated name
*/
export function generateRandomName(): string {
const adjective = generateRandomWord(lists.adjectives);
const things = generateRandomWord(lists.items);
const adjective = generateRandomWord(adjectives);
const things = generateRandomWord(items);
return `${adjective} ${things}`;
}

File diff suppressed because it is too large Load diff