フィールド · Maybe

フィールド · Maybe · helpers.maybe. 生成メソッド · 例

helpers.maybe

生成設定

生成したデータはここに表示されます。

パラメーター & 例

Returns the result of the callback if the probability check was successful, otherwise undefined.

helpers.maybe(callback: () => TResult, options?: { probability? })
callback
The callback that will be invoked if the probability check was successful.
options
The options to use.
options.probability
The probability ([0.00, 1.00]) of the callback being invoked. Defaults to 0.5.

例

null

テスト環境で合成データを使用してください。

関連ジェネレーター

シナリオを見る