randEmotion
What someone feels, from joy to a quiet regret.
randWord with theme fixed to 'emotion'WordTheme.emotion"emotion"; every other option is the same one, and means the same thing.
javascript
import { randEmotion } from 'randino';
randEmotion({ language: 'en', count: 3 }); // ['Longing', 'Delight', 'Relief']
randEmotion({ language: 'en', output: 'detail' });
// [{ word: 'Longing', language: 'en', theme: 'emotion' }]dart
import 'package:randino/randino.dart';
randEmotion(language: WordLanguage.en, count: 3); // [Longing, Delight, Relief]Returns List<String>. For the detail form, pass WordTheme.emotion to randWordDetails. Dart has no overloads, and a detail twin for each of the twenty-nine themes would be twenty-nine functions too many.
python
from randino import rand_emotion
rand_emotion(language="en", count=3) # ['Longing', 'Delight', 'Relief']
rand_emotion(language="en", output="detail")
# [WordDetail(word='Longing', language='en', theme='emotion')]Options
| Option | Type | Default | Description |
|---|---|---|---|
language | WordLanguageOptionWordLanguage?WordLanguageOption | 'all'null"all" | Language of the generated words. Left out, it picks one per word and mixes them all. |
count | numberintint | 1 | How many words to return. Clamped to 0 … 10000. |
realism | RandRealismRandRealismRandRealism | 'real'RandRealism.real"real" | real draws from the pools, invented builds words that only read like the language, and mixed decides per word. |
vocabulary | RandVocabularyRandVocabularyRandVocabulary | 'full'RandVocabulary.full"full" | basic draws the everyday words, common those and the ones an adult uses now and then, full every word the pools hold. |
minLengthminLengthmin_length | numberint?int | None | pools | Minimum length in characters. Left out, it follows what the pools hold. |
maxLengthmaxLengthmax_length | numberint?int | None | pools | Maximum length in characters. A range the pool cannot serve is answered with the closest word. |
startsWithstartsWithstarts_with | stringString?str | —null"" | Keep only words whose first character is this one. |
unique | booleanboolbool | falsefalseFalse | Never return the same word twice. Returns fewer than asked once a pool runs out. |
random | () => numberRandom?Callable[[], float] | None | —nullNone | Where the randomness comes from. Defaults to the platform's ordinary generator. |
output | RandOutputRandOutput | 'value'"value" | Strings, or one WordDetail per word. |