sonare
v0.0.1
Published
Pronounceable and organic words that feel natural.
Maintainers
Readme
sonare
Pronounceable and organic words that feel natural.
A lightweight library that generates unique, pronounceable and organic words that feel natural.
- Highly Unique: >85% uniqueness even when generating 1 million words
- Pronounceable: Uses phoneme-based generation for easy-to-say words
- Customizable: Configure minimum and maximum word length
- Lightweight: Zero dependencies
- Fast: Optimized for high-volume generation
Installation
# pnpm
pnpm add sonare
# npm
npm install sonare
# yarn
yarn add sonareUsage
Basic Usage
import { sonare } from 'sonare';
const word = sonare();
console.log(word); // e.g., "veluna" or "minecho"Custom Length
import { sonare } from 'sonare';
const word = sonare({ minLength: 4, maxLength: 6 });
console.log(word); // e.g., "luna" or "vexar"
const word = sonare({ minLength: 10, maxLength: 15 });
console.log(word); // e.g., "velunambor" or "crisechoten"Generate Multiple Unique words
import { sonare } from 'sonare';
const words = Array.from({ length: 100 }, () => sonare());
console.log(words); // ["ambor", "tenen", "zilfer", ...]API Reference
sonare(options?: SonareOptions): string
Generates a single pronounceable word.
Parameters:
options(optional): Configuration objectminLength(number, default:6): Minimum length of the generated wordmaxLength(number, default:10): Maximum length of the generated word
Returns:
string: A pronounceable word containing only lowercase letters
Example:
const word = sonare({ minLength: 8, maxLength: 12 });License
MIT
Author
- Bu Kinoshita (@bukinoshita) — Resend
- Zeh Fernandes (@zehf) — Resend
