mirror of
https://github.com/Azgaar/Fantasy-Map-Generator.git
synced 2025-12-17 17:51:24 +01:00
1.1 KiB
1.1 KiB
External Dependencies for names-generator.js
The refactored names-generator.js module requires the following external dependencies to be imported:
Utility Functions
ERROR- Error logging flag/functionWARN- Warning logging flag/functionP- Probability function (returns true/false based on probability)ra- Random array element selector functionlast- Function to get last character/element of a string/arrayvowel- Function to check if a character is a vowelcapitalize- Function to capitalize a stringrand- Random number generator function
These utilities should be imported from a common utilities module (e.g., ../utils/index.js) and passed as a utils object parameter to the exported functions.
Data Dependencies
nameBases- Array of name base configurations (passed as parameter)cultures- Culture data object with base references (passed as parameter from pack data)
Notes
- All global state access has been removed and replaced with parameter injection
- The module is now pure and environment-agnostic
- No browser or DOM dependencies remain