Skip to content

randPlant

Plants: trees, flowers, leaves and what grows on them.

randWord with theme fixed to 'plant'WordTheme.plant"plant"; every other option is the same one, and means the same thing.

javascript
import { randPlant } from 'randino';

randPlant({ language: 'en', count: 3 }); // ['Treetop', 'Blossom', 'Fern']
randPlant({ language: 'en', output: 'detail' });
// [{ word: 'Treetop', language: 'en', theme: 'plant' }]
dart
import 'package:randino/randino.dart';

randPlant(language: WordLanguage.en, count: 3); // [Treetop, Blossom, Fern]

Returns List<String>. For the detail form, pass WordTheme.plant 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_plant

rand_plant(language="en", count=3)  # ['Treetop', 'Blossom', 'Fern']
rand_plant(language="en", output="detail")
# [WordDetail(word='Treetop', language='en', theme='plant')]

Options

OptionTypeDefaultDescription
languageWordLanguageOptionWordLanguage?WordLanguageOption'all'null"all"Language of the generated words. Left out, it picks one per word and mixes them all.
countnumberintint1How many words to return. Clamped to 0 … 10000.
realismRandRealismRandRealismRandRealism'real'RandRealism.real"real"real draws from the pools, invented builds words that only read like the language, and mixed decides per word.
vocabularyRandVocabularyRandVocabularyRandVocabulary'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_lengthnumberint?int | NonepoolsMinimum length in characters. Left out, it follows what the pools hold.
maxLengthmaxLengthmax_lengthnumberint?int | NonepoolsMaximum length in characters. A range the pool cannot serve is answered with the closest word.
startsWithstartsWithstarts_withstringString?strnull""Keep only words whose first character is this one.
uniquebooleanboolboolfalsefalseFalseNever return the same word twice. Returns fewer than asked once a pool runs out.
random() => numberRandom?Callable[[], float] | NonenullNoneWhere the randomness comes from. Defaults to the platform's ordinary generator.
outputRandOutputRandOutput'value'"value"Strings, or one WordDetail per word.

See also

  • randWord — the same generator with theme open, and what each option does in full.
  • Themes — the other twenty-four, and the words each one holds.

Released under the MIT License