Skip to main content

Mock

@webda/models


Variable: Mock

const Mock: {(meta): (_value, context) => void; avatar: ReturnType<typeof mark>; email: ReturnType<typeof mark>; firstName: ReturnType<typeof mark>; fullName: ReturnType<typeof mark>; lastName: ReturnType<typeof mark>; linkExisting: ReturnType<typeof mark>; linkNew: ReturnType<typeof mark>; percentage: ReturnType<typeof mark>; phone: ReturnType<typeof mark>; recentDate: ReturnType<typeof mark>; url: ReturnType<typeof mark>; uuid: ReturnType<typeof mark>; word: ReturnType<typeof mark>; ai: (_value, context) => void; count: (_value, context) => void; custom: (_value, context) => void; float: (_value, context) => void; futureDate: (_value, context) => void; integer: (_value, context) => void; lorem: (_value, context) => void; pastDate: (_value, context) => void; pick: (_value, context) => void; }

Defined in: packages/models/src/mock.ts:49

Type Declaration​

Parameters​

meta​

MockMeta

Returns​

(_value, context) => void

avatar​

avatar: ReturnType<typeof mark>

email​

email: ReturnType<typeof mark>

firstName​

firstName: ReturnType<typeof mark>

fullName​

fullName: ReturnType<typeof mark>

lastName​

lastName: ReturnType<typeof mark>

linkExisting​

linkExisting: ReturnType<typeof mark>

linkNew​

linkNew: ReturnType<typeof mark>

percentage​

percentage: ReturnType<typeof mark>

phone​

phone: ReturnType<typeof mark>

recentDate​

recentDate: ReturnType<typeof mark>

url​

url: ReturnType<typeof mark>

uuid​

uuid: ReturnType<typeof mark>

word​

word: ReturnType<typeof mark>

ai()​

ai(opts): (_value, context) => void

Parameters​

opts​
maxTokens?​

number

prompt​

string

Returns​

(_value, context) => void

count()​

count(nOrRange): (_value, context) => void

Parameters​

nOrRange​

number | { max?: number; min?: number; }

Returns​

(_value, context) => void

custom()​

custom(fn): (_value, context) => void

Parameters​

fn​

(ctx) => unknown

Returns​

(_value, context) => void

float()​

float(opts?): (_value, context) => void

Parameters​

opts?​
max?​

number

min?​

number

precision?​

number

Returns​

(_value, context) => void

futureDate()​

futureDate(opts?): (_value, context) => void

Parameters​

opts?​
within?​

"day" | "week" | "month" | "year"

Returns​

(_value, context) => void

integer()​

integer(opts?): (_value, context) => void

Parameters​

opts?​
max?​

number

min?​

number

Returns​

(_value, context) => void

lorem()​

lorem(opts?): (_value, context) => void

Parameters​

opts?​
paragraphs?​

number

sentences?​

number

words?​

number

Returns​

(_value, context) => void

pastDate()​

pastDate(opts?): (_value, context) => void

Parameters​

opts?​
within?​

"day" | "week" | "month" | "year"

Returns​

(_value, context) => void

pick()​

pick<T>(values): (_value, context) => void

Type Parameters​

T​

T

Parameters​

values​

readonly T[]

Returns​

(_value, context) => void