MCPcopy
hub / github.com/faker-js/faker / dish

Method dish

src/modules/food/index.ts:61–72  ·  view source on GitHub ↗

* Generates a random dish name. * * @example * faker.food.dish() // 'Tagine-Rubbed Venison Salad' * * @since 9.0.0

()

Source from the content-addressed store, hash-verified

59 * @since 9.0.0
60 */
61 dish(): string {
62 // A 50/50 mix of specific dishes and dish_patterns
63 if (this.faker.datatype.boolean()) {
64 return toTitleCase(
65 this.faker.helpers.fake(this.faker.definitions.food.dish_pattern)
66 );
67 }
68
69 return toTitleCase(
70 this.faker.helpers.arrayElement(this.faker.definitions.food.dish)
71 );
72 }
73
74 /**
75 * Generates a random food's ethnic category.

Callers 1

food.spec.tsFile · 0.80

Calls 4

toTitleCaseFunction · 0.85
booleanMethod · 0.80
fakeMethod · 0.80
arrayElementMethod · 0.80

Tested by

no test coverage detected