nihon-name-generator
v1.0.0
Published
A comprehensive library for generating authentic Japanese names with meanings, kanji readings, and cultural context
Maintainers
Readme
Nihon Name Generator
A comprehensive Node.js library for generating authentic Japanese names with kanji, hiragana readings, romaji, and detailed meanings. Perfect for game development, creative writing, testing, and cultural projects.
✨ Features
- 🎌 Comprehensive Database: Over 2000+ authentic Japanese names
- 300+ surnames (family names)
- 600+ male given names
- 600+ female given names
- 500+ unisex given names
- 📖 Detailed Information: Each name includes:
- Kanji characters (漢字)
- Hiragana reading (ひらがな)
- Romaji transliteration
- Meaning and etymology
- Kanji count
- Thematic tags (nature, peace, strength, beauty, love, light, wisdom)
- 🎯 Flexible Filtering: Filter by gender, kanji count, meaning tags
- 🔍 Search Functionality: Search names by kanji, romaji, or meaning
- 📊 Statistics: Get database statistics and available tags
- 🌐 Full Name Generation: Automatically combine surnames and given names
📦 Installation
npm install nihon-name-generator🚀 Quick Start
const {
generateSurnames,
generateGivenNames,
generateFullNames,
searchNames
} = require('nihon-name-generator');
// Generate random surnames
const surnames = generateSurnames({ count: 3 });
console.log(surnames);
// Output:
// [
// {
// kanji: '佐藤',
// reading: 'さとう',
// romaji: 'Sato',
// meaning: 'Sa (help) + To (Fujiwara clan)',
// kanjiCount: 2,
// tags: ['strength']
// },
// ...
// ]
// Generate male given names
const maleNames = generateGivenNames({
count: 2,
gender: 'male',
tag: 'strength'
});
// Generate full names
const fullNames = generateFullNames({
count: 5,
gender: 'female'
});
// Search for names
const results = searchNames('yuki', { type: 'given' });📚 API Documentation
generateSurnames(options)
Generate random Japanese surnames.
Parameters:
options.count(number, optional): Number of names to generate (1-10). Default: 1options.kanjiCount(string|number, optional): Filter by kanji count (1, 2, 3, or 'all'). Default: 'all'options.tag(string, optional): Filter by tag ('nature', 'peace', 'strength', 'beauty', 'love', 'light', 'wisdom', or 'all'). Default: 'all'
Returns: Array of surname objects
generateGivenNames(options)
Generate random Japanese given names.
Parameters:
options.count(number, optional): Number of names to generate (1-10). Default: 1options.gender(string, optional): Gender filter ('male', 'female', 'unisex', or 'all'). Default: 'all'options.kanjiCount(string|number, optional): Filter by kanji count. Default: 'all'options.tag(string, optional): Filter by tag. Default: 'all'
Returns: Array of given name objects
generateFullNames(options)
Generate complete Japanese names (surname + given name).
Parameters:
options.count(number, optional): Number of full names to generate (1-10). Default: 1options.gender(string, optional): Gender filter for given name. Default: 'all'options.tag(string, optional): Filter by tag. Default: 'all'
Returns: Array of full name objects with combined information
searchNames(query, options)
Search for names by kanji, romaji, or meaning.
Parameters:
query(string): Search termoptions.type(string, optional): Type filter ('surname', 'given', or 'all'). Default: 'all'options.gender(string, optional): Gender filter for given names. Default: 'all'
Returns: Array of matching name objects
getAvailableTags()
Get list of all available meaning tags.
Returns: Array of tag strings
getStats()
Get database statistics.
Returns: Object with counts of surnames, male/female/unisex names, and available tags
💡 Usage Examples
Example 1: Character Name Generator
const { generateFullNames } = require('nihon-name-generator');
function createCharacter(gender, theme) {
const names = generateFullNames({
count: 1,
gender: gender,
tag: theme
});
const character = names[0];
console.log(`
Character Name: ${character.kanji}
Reading: ${character.reading}
Romaji: ${character.romaji}
Meaning: ${character.meaning}
Themes: ${character.tags.join(', ')}
`);
}
createCharacter('female', 'beauty');Example 2: Name with Specific Kanji Count
const { generateGivenNames } = require('nihon-name-generator');
// Generate names with exactly 2 kanji characters
const names = generateGivenNames({
count: 5,
gender: 'male',
kanjiCount: 2
});
names.forEach(name => {
console.log(`${name.kanji} (${name.romaji}) - ${name.meaning}`);
});Example 3: Theme-Based Name Generator
const { generateFullNames } = require('nihon-name-generator');
// Generate names with nature theme
const natureNames = generateFullNames({
count: 10,
tag: 'nature'
});
console.log('Nature-themed Japanese names:');
natureNames.forEach(name => {
console.log(`${name.romaji}: ${name.kanji} - ${name.meaning}`);
});Example 4: Name Search
const { searchNames } = require('nihon-name-generator');
// Search for names containing "sakura" (cherry blossom)
const results = searchNames('sakura');
console.log(`Found ${results.length} names related to "sakura":`);
results.forEach(result => {
console.log(`- ${result.kanji} (${result.romaji}): ${result.meaning}`);
});🎨 Meaning Tags
Names are categorized with thematic tags:
- nature: Names related to natural elements (trees, mountains, rivers, flowers)
- peace: Names representing harmony, tranquility, and peace
- strength: Names symbolizing power, courage, and resilience
- beauty: Names associated with aesthetics and elegance
- love: Names expressing affection, kindness, and warmth
- light: Names related to brightness, illumination, and clarity
- wisdom: Names representing knowledge, intelligence, and enlightenment
🌐 Website
Check out the interactive web version: Japanese Name Generator
The website features:
- Interactive name generation with real-time filters
- Beautiful cherry blossom animations
- Detailed name explanations
- Name search functionality
- Cultural insights about Japanese naming traditions
🤝 Contributing
Contributions are welcome! Please feel free to submit a Pull Request.
📄 License
This project is licensed under the MIT License - see the LICENSE file for details.
🙏 Acknowledgments
- Name database compiled from authentic Japanese naming resources
- Cultural meanings and readings verified for accuracy
- Inspired by traditional Japanese naming conventions and kanji etymology
📮 Support
If you have any questions or suggestions, please:
- Open an issue on GitHub
- Visit our website: https://yourdomain.com
🔗 Related Projects
- Japanese Name Generator Website - Interactive web interface
- Check out our blog posts about Japanese naming traditions
Made with ❤️ for Japanese language and culture enthusiasts
