Significant work done porting to headless engine

This commit is contained in:
barrulus 2025-08-04 00:01:48 +01:00
parent ab08dc9429
commit d1b07fff01
573 changed files with 50603 additions and 0 deletions

View file

@ -0,0 +1,24 @@
# 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/function
- `WARN` - Warning logging flag/function
- `P` - Probability function (returns true/false based on probability)
- `ra` - Random array element selector function
- `last` - Function to get last character/element of a string/array
- `vowel` - Function to check if a character is a vowel
- `capitalize` - Function to capitalize a string
- `rand` - 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