@@ -1023,7 +1023,7 @@ const zFloatGeneratorArithmeticSequence = z.object({
1023
1023
} ) ;
1024
1024
export type FloatGeneratorArithmeticSequence = z . infer < typeof zFloatGeneratorArithmeticSequence > ;
1025
1025
export const getFloatGeneratorArithmeticSequenceDefaults = ( ) => zFloatGeneratorArithmeticSequence . parse ( { } ) ;
1026
- export const getFloatGeneratorArithmeticSequenceValues = ( generator : FloatGeneratorArithmeticSequence ) => {
1026
+ const getFloatGeneratorArithmeticSequenceValues = ( generator : FloatGeneratorArithmeticSequence ) => {
1027
1027
const { start, step, count } = generator ;
1028
1028
if ( step === 0 ) {
1029
1029
return [ start ] ;
@@ -1041,8 +1041,8 @@ const zFloatGeneratorLinearDistribution = z.object({
1041
1041
values : z . array ( z . number ( ) ) . nullish ( ) ,
1042
1042
} ) ;
1043
1043
export type FloatGeneratorLinearDistribution = z . infer < typeof zFloatGeneratorLinearDistribution > ;
1044
- export const getFloatGeneratorLinearDistributionDefaults = ( ) => zFloatGeneratorLinearDistribution . parse ( { } ) ;
1045
- export const getFloatGeneratorLinearDistributionValues = ( generator : FloatGeneratorLinearDistribution ) => {
1044
+ const getFloatGeneratorLinearDistributionDefaults = ( ) => zFloatGeneratorLinearDistribution . parse ( { } ) ;
1045
+ const getFloatGeneratorLinearDistributionValues = ( generator : FloatGeneratorLinearDistribution ) => {
1046
1046
const { start, end, count } = generator ;
1047
1047
if ( count === 1 ) {
1048
1048
return [ start ] ;
@@ -1060,11 +1060,8 @@ const zFloatGeneratorUniformRandomDistribution = z.object({
1060
1060
values : z . array ( z . number ( ) ) . nullish ( ) ,
1061
1061
} ) ;
1062
1062
export type FloatGeneratorUniformRandomDistribution = z . infer < typeof zFloatGeneratorUniformRandomDistribution > ;
1063
- export const getFloatGeneratorUniformRandomDistributionDefaults = ( ) =>
1064
- zFloatGeneratorUniformRandomDistribution . parse ( { } ) ;
1065
- export const getFloatGeneratorUniformRandomDistributionValues = (
1066
- generator : FloatGeneratorUniformRandomDistribution
1067
- ) => {
1063
+ const getFloatGeneratorUniformRandomDistributionDefaults = ( ) => zFloatGeneratorUniformRandomDistribution . parse ( { } ) ;
1064
+ const getFloatGeneratorUniformRandomDistributionValues = ( generator : FloatGeneratorUniformRandomDistribution ) => {
1068
1065
const { min, max, count } = generator ;
1069
1066
const values = Array . from ( { length : count } , ( ) => Math . random ( ) * ( max - min ) + min ) ;
1070
1067
return values ;
@@ -1078,8 +1075,8 @@ const zFloatGeneratorParseString = z.object({
1078
1075
values : z . array ( z . number ( ) ) . nullish ( ) ,
1079
1076
} ) ;
1080
1077
export type FloatGeneratorParseString = z . infer < typeof zFloatGeneratorParseString > ;
1081
- export const getFloatGeneratorParseStringDefaults = ( ) => zFloatGeneratorParseString . parse ( { } ) ;
1082
- export const getFloatGeneratorParseStringValues = ( generator : FloatGeneratorParseString ) => {
1078
+ const getFloatGeneratorParseStringDefaults = ( ) => zFloatGeneratorParseString . parse ( { } ) ;
1079
+ const getFloatGeneratorParseStringValues = ( generator : FloatGeneratorParseString ) => {
1083
1080
const { input, splitOn } = generator ;
1084
1081
const values = input
1085
1082
. split ( splitOn )
@@ -1160,7 +1157,7 @@ const zIntegerGeneratorArithmeticSequence = z.object({
1160
1157
} ) ;
1161
1158
export type IntegerGeneratorArithmeticSequence = z . infer < typeof zIntegerGeneratorArithmeticSequence > ;
1162
1159
export const getIntegerGeneratorArithmeticSequenceDefaults = ( ) => zIntegerGeneratorArithmeticSequence . parse ( { } ) ;
1163
- export const getIntegerGeneratorArithmeticSequenceValues = ( generator : IntegerGeneratorArithmeticSequence ) => {
1160
+ const getIntegerGeneratorArithmeticSequenceValues = ( generator : IntegerGeneratorArithmeticSequence ) => {
1164
1161
const { start, step, count } = generator ;
1165
1162
if ( step === 0 ) {
1166
1163
return [ start ] ;
@@ -1178,8 +1175,8 @@ const zIntegerGeneratorLinearDistribution = z.object({
1178
1175
values : z . array ( z . number ( ) . int ( ) ) . nullish ( ) ,
1179
1176
} ) ;
1180
1177
export type IntegerGeneratorLinearDistribution = z . infer < typeof zIntegerGeneratorLinearDistribution > ;
1181
- export const getIntegerGeneratorLinearDistributionDefaults = ( ) => zIntegerGeneratorLinearDistribution . parse ( { } ) ;
1182
- export const getIntegerGeneratorLinearDistributionValues = ( generator : IntegerGeneratorLinearDistribution ) => {
1178
+ const getIntegerGeneratorLinearDistributionDefaults = ( ) => zIntegerGeneratorLinearDistribution . parse ( { } ) ;
1179
+ const getIntegerGeneratorLinearDistributionValues = ( generator : IntegerGeneratorLinearDistribution ) => {
1183
1180
const { start, end, count } = generator ;
1184
1181
if ( count === 1 ) {
1185
1182
return [ start ] ;
@@ -1197,11 +1194,8 @@ const zIntegerGeneratorUniformRandomDistribution = z.object({
1197
1194
values : z . array ( z . number ( ) . int ( ) ) . nullish ( ) ,
1198
1195
} ) ;
1199
1196
export type IntegerGeneratorUniformRandomDistribution = z . infer < typeof zIntegerGeneratorUniformRandomDistribution > ;
1200
- export const getIntegerGeneratorUniformRandomDistributionDefaults = ( ) =>
1201
- zIntegerGeneratorUniformRandomDistribution . parse ( { } ) ;
1202
- export const getIntegerGeneratorUniformRandomDistributionValues = (
1203
- generator : IntegerGeneratorUniformRandomDistribution
1204
- ) => {
1197
+ const getIntegerGeneratorUniformRandomDistributionDefaults = ( ) => zIntegerGeneratorUniformRandomDistribution . parse ( { } ) ;
1198
+ const getIntegerGeneratorUniformRandomDistributionValues = ( generator : IntegerGeneratorUniformRandomDistribution ) => {
1205
1199
const { min, max, count } = generator ;
1206
1200
const values = Array . from ( { length : count } , ( ) => Math . floor ( Math . random ( ) * ( max - min + 1 ) ) + min ) ;
1207
1201
return values ;
@@ -1215,8 +1209,8 @@ const zIntegerGeneratorParseString = z.object({
1215
1209
values : z . array ( z . number ( ) . int ( ) ) . nullish ( ) ,
1216
1210
} ) ;
1217
1211
export type IntegerGeneratorParseString = z . infer < typeof zIntegerGeneratorParseString > ;
1218
- export const getIntegerGeneratorParseStringDefaults = ( ) => zIntegerGeneratorParseString . parse ( { } ) ;
1219
- export const getIntegerGeneratorParseStringValues = ( generator : IntegerGeneratorParseString ) => {
1212
+ const getIntegerGeneratorParseStringDefaults = ( ) => zIntegerGeneratorParseString . parse ( { } ) ;
1213
+ const getIntegerGeneratorParseStringValues = ( generator : IntegerGeneratorParseString ) => {
1220
1214
const { input, splitOn } = generator ;
1221
1215
const values = input
1222
1216
. split ( splitOn )
0 commit comments