フィールド · Weighted Array Element
フィールド · Weighted Array Element · helpers.weightedArrayElement. 生成メソッド · 例
helpers.weightedArrayElement
生成設定
生成したデータはここに表示されます。
パラメーター & 例
Returns a weighted random element from the given array. Each element of the array should be an object with two keys weight and value.
helpers.weightedArrayElement(array: ReadonlyArray<{ weight: number; value: T; }>)- array
- Array to pick the value from.
- array[].weight
- The weight of the value.
- array[].value
- The value to pick.
例
"draft"テスト環境で合成データを使用してください。